note 61123 added to function.eval
| From: | mailme at zorex dot info | Date: | Thu, 26 Jan 2006 09:43:18 +0000 |
| Subject: | note 61123 added to function.eval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102468@lists.php.net to get a copy of this message | ||
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
----
Server IP: 202.157.183.147
Probable Submitter: 60.50.173.115
----
Manual Page -- http://www.php.net/manual/en/function.eval.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61123
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61123&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61123&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61123&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61123&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61123&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61123&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61123&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61123&report=yes
Search -- http://master.php.net/manage/user-notes.php