All said that Alibaba has failed to collect and prevent the collection of myths, today, with Mr. Zhang said Curl Collection wrote a simulation of the browser code. No, it can't be done, haha.
<?php
Set_time_limit (0);
function _rand () {
$length = 26;
$chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$max = strlen ($chars)-1;
Mt_srand (Double) microtime () * 1000000);
$string = ';
for ($i = 0; $i < $length; $i + +) {
$string. = $chars [Mt_rand (0, $max)];
}
return $string;
}
$HTTP _session=_rand ();
$HTTP _session;
$HTTP _server= "search.china.alibaba.com";
$HTTP _url= "/company/k-%cb%ae%cb%ae%cb%ae_n-y.html";
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, "http://". $HTTP _server. $HTTP _url);
curl_setopt ($ch, curlopt_returntransfer,true);
curl_setopt ($ch, Curlopt_useragent, "mozilla/4.0" (compatible; MSIE 6.0; Windows NT 5.1; SV1. NET CLR 1.1.4322;. NET CLR 2.0.50727);
$res = curl_exec ($ch);
Curl_close ($ch);
Print_r ($res);
?>