\n";
} else {
$rand_ip = rand(1,254).".".rand(1,254).".".rand(1,254).".".rand(1,254);
$out = "GET $link HTTP/1.1\r\n".
"Host: $host\r\n".
"Referer: http://www.google.com.vn/search?hl=vi&client=firefox-a&rls=org.mozilla:en-US:official&hs=hKS&q=video+clip&start=20&sa=N\r\n".
"Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n";
if($cookie) $out .= "Cookie: $cookie\r\n";
if($user_agent) $out .= "User-Agent: ".$user_agent."\r\n";
else $out .= "User-Agent: ".userAgent()."\r\n";
$out .= "X-Forwarded-For: $rand_ip\r\n".
"Via: CB-Prx\r\n".
"Connection: Close\r\n\r\n";
fwrite($fp,$out);
while (!feof($fp)) {
$html .= fgets($fp,4096);
}
fclose($fp);
}
}
return $html;
}
function laynoidung($noidung, $start, $stop) {
$bd = strpos($noidung, $start);
$kt = strpos(substr($noidung, $bd), $stop) + $bd;
$content = substr($noidung, $bd, $kt - $bd);
return $content;
}
function box($link, $sup, $sub)
{
echo "\n" . ''.$sup.'';
echo "\n" . "";
echo "\n" . "';
}
function check($string) {
$string = str_replace('&', '&', $string);
$string = preg_replace('~*([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
$string = preg_replace('~*([0-9]+);~e', 'chr(\\1)', $string);
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
}
?>