php - Extract URL from curl response -


i have following response php curl request:

function ___qby1szi() {   ymi = 5849562624174926";   kno = "http://download2.website.com/ce0zbkpbzmzg/2g7xednxqx4m11f/blabla.rar";   output = "";   for(i=0; i<ymi.length; i+=2){   output = output + string.fromcharcode( (128+ ( parseint("0x"+ymi.substr(i, 2)) -           kno.charcodeat(0) )) % 128 ); } return output; } 

i want extract url response:

http://download2.website.com/ce0zbkpbzmzg/2g7xednxqx4m11f/blabla.rar

can tell me best way? have used preg_match seems slow.

if preg_match() "slow", can imagine wrongly used it.

try following pattern:

/kno = "(.*)";/ 

matching group[1] contain url.

example:

$string = <<<eof function ___qby1szi() {   ymi = 5849562624174926";   kno = "http://download2.website.com/ce0zbkpbzmzg/2g7xednxqx4m11f/blabla.rar";   output = "";   for(i=0; i<ymi.length; i+=2){   output = output + string.fromcharcode( (128+ ( parseint("0x"+ymi.substr(i, 2)) -           kno.charcodeat(0) )) % 128 ); } return output; } eof;  preg_match('/kno = "(.*)";/', $string, $matches); echo $matches[1]; 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -