The
Code is as follows:
function Steal ($url, $post _data = "") {
//$header [] = "accept:text/vnd.wap.wml,*.*";
$user _agent = "mozilla/4.0";
$follow _loc = 1;
$cookie _file = "./tmp/cook.txt";
$ch = @curl_init ();
@curl_setopt ($ch, Curlopt_url, $url);
@curl_setopt ($ch, curlopt_useragent, $user _agent);
@curl_setopt ($ch, Curlopt_cookiejar, $cookie _file);
@curl_setopt ($ch, Curlopt_cookiefile, $cookie _file);
@curl_setopt ($ch, Curlopt_header, $header);
@curl_setopt ($ch, Curlopt_returntransfer, 1);
@curl_setopt ($ch, curlopt_followlocation, $follow _loc);
@curl_setopt ($ch, curlopt_timeout, 1000);
if (Trim ($post _data)!= "") {
@curl_setopt ($ch, Curlopt_post, 1);
@curl_setopt ($ch, Curlopt_postfields, $post _data);
}
$result = @curl_exec ($ch);
@curl_close ($ch);
return $result;
}
//Get the page code method
function Cut ($file, $from, $end) {
$message =explode ($from, $file);
$message =explode ($ End, $message [1]);
if ($mEssage[0] = = "")
{
$message [0] = "<font color= ' #ff0000 ' > Cannot get content </font>";
}
return $message [0];
}
//method of intercepting code