Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $string = file_get_contents("sample-file.txt");
- $found = false;
- $n = 0;
- do {
- $found = (strpos($string, 'eval') !== false);
- if ($found) {
- ob_start();
- eval(str_replace("eval", "print", $string));
- $string = ob_get_clean();
- }
- $n++;
- } while ($found);
- //echo $n;
- //print $string;
- file_put_contents ("result.php", $string);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement