note 61123 deleted from function.eval by betz
| From: | betz@php.net | Date: | Fri, 10 Mar 2006 16:55:32 +0000 |
| Subject: | note 61123 deleted from function.eval by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-105222@lists.php.net to get a copy of this message | ||
Note Submitter: mailme at zorex dot info
----
thnx to Matt, your code about replacement of open tag and close tag of PHP involving HTML tag in it
really works. I created a PHP encoder to encode php source code. Everything works fine at the
begining without html tag after ?>. When I try it on php files with HTML tag after ?> the
whole eval() things went wrong.
eg.
<?php
if (function_exists('remove_tags'))
{//Do nothing}
else
{
function remove_tags ($str) {
$str=str_replace('<'.'?php','<'.'?',$str);
$str='?'.'>'.trim($str).'<'.'?';
return $str
}
}
if($done=="y")
{
$str = "asd8Ldf87gf)F(+......";//this including some html tag in it after the encoding
process.
eval(uncrypt(remove_tags($str)));//where uncrypt is my own function
}
?>
This simple piece of code works perfectly. The encoding works all php files. Thnx man. :D