Return to Snippet

Revision: 14290
at May 28, 2009 13:00 by Thresh


Initial Code
#!/usr/local/bin/php
<?
  $arr = file('list.txt');
  $k = 1;
  foreach($arr as $line) {
			$filer =  explode(':',$line);
			$res = replaceIT($filer[0]);
			if($res){
				ausgabe($k.'. '.$filer[0].'<br/>');
			}else {
				ausgabe($k.'. '.$filer[0].' <span style="color:red">FAIL</span> <br/>');
			}
    	$k++;
   }
   



function replaceIT($path)
{
	
	$oku = file_get_contents($path);
    //    $yaz = str_replace('<br>','',$oku);
    $desen = '|<iframe .+?></iframe>|i';
    $yaz = preg_replace($desen,'',$oku);
	$res =   file_put_contents($path,$yaz);
	return $res;

}
function ausgabe ($text) {
	echo $text;
	for($j = 0; $j < 600; $j++) echo ' '; // extra spaces
	ob_flush();
	flush();
}
?>

Initial URL
www.laydo.net

Initial Description
iframe virus replacement php

Initial Title
Iframe virus replacer

Initial Tags


Initial Language
PHP