preg_replace problem


Ok, I am trying to encrypt specific strings in a file.
current code:
Code: $var = preg_replace('|(.*)src=(.*)>(.*)|', '\1src=image.phpsite='. $_GET[url] .'&url='. base64_encode('\2') .'>\3', $var);

That doesn't work though, it encrypts '\2' rather than whatever is in the second wildcard space.. anyway to fix this , callback function
Posted On: Wednesday 24th of October 2012 12:32:32 AM Total Views:  442
View Complete with Replies

RELATED TOPICS OF PHP PROGRAMMING LANGUAGE