Copy codeThe Code is as follows:
<? Php
$ Title = 'foot home ';
$ Hello = 'jb51. net! ';
$ File = file_get_contents ('HTTP: // www.baidu.com ');
$ File = iconv ("gbk // IGNORE", "UTF-8", $ file );
// Echo $ file;
Echo strpos ($ file, '<title> ');
Echo substr ($ file, strpos ($ file, '<title>') + 7, strpos ($ file, '</title>'-strpos ($ file, '<title>') + 7 ));
$ File = str_replace (array ('Baidu review ',' {hello} '), array ($ title, $ hello), $ file );
?>
The following is the program code of the thieves used by yuhai. For more information, see. The script home provides a variety of thieves.
Copy codeThe Code is as follows:
<? Php
Function _ url ($ Date ){
$ Ch = curl_init ();
$ Timeout = 5;
Curl_setopt ($ ch, CURLOPT_URL, "$ Date ");
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
Curl_setopt ($ ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1 )");
Curl_setopt ($ ch, CURLOPT_CONNECTTIMEOUT, $ timeout );
$ Contents = curl_exec ($ ch );
Curl_close ($ ch );
Return $ contents;
}
$ Url = "http://www.jb51.net ";
$ Contents. = _ url ($ url );
Echo $ contents; // output content
?>