Read the target site once every 20 hours, you can modify it yourself, and you will understand how to get other sites after reading it, it is very simple. chuanqi.php // Thief
Copy the code The code is as follows:
extract($_GET);extract($_POST); $clinchurl = "http://www.haosf.com"; //Target site $url = $clinchurl.$domain; $fp=@fopen( $url,"r") or die("timeout");//Determine whether the webpage can be opened $fcontents = file_get_contents($url); //echo $fcontents; if(eregi('legendary server name< /font>
(.*)>Next page
',$fcontents,$regs) ) { //The (.*) above is where you want to get the content-list $clinch = "
Legendary server name
".$regs[1]."< /div>"; //Complete the html of the obtained content and use it yourself }//END IF $clinch=str_replace('
','Your own ad',$ clinch); //A series of str_replace, replace unnecessary things, such as advertisements or pictures ?>
include "lanmu.php"; //Column list ?>
//Use this judgment to update the html page < ;?=$clinch?>
include "foot.php"; ?>
make.php //Generate html.cache
Copy the code The code is as follows:
extract($_GET);extract($_POST); $url="http://xxxxxxx.com/chuanqi.php"; if(!$file){ $file="index.html" ;$url="http://xxxxxxxxxxxx.com/chuanqi.php"; } /*Add the statement to judge this $url yourself to give $file a different name-----------》 Generate different html names For example: if($file="wow.html"){ //$file is passed by iframe when people visit the html page $url="http://xxxxxx/wow .php" //Corresponding dynamic page } */ $path=$file; $cache_filetime = filemtime($path); if (time() - $cache_filetime <= 72000) { //* * the cache is not expire echo "There is no need to update yet"; }else{ $fp=@fopen($url,"r") or die("timeout");//Determine whether the web page can be opened $ fcontents = file_get_contents($url); $handle=fopen($path,'w'); //Open the path in writing mode fwrite($handle,$fcontents); //Write the content just replaced into the generated HTML file fclose($handle); echo "done"; } ?>
The above introduces http://www.google.com.hk/ Thief PHP+Html+caching, including the content of http://www.google.com.hk/. I hope friends who are interested in PHP tutorials can learn from it. help.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn