WORKAROUND: Use the server as the proxy.
In PHP, use my favorite of the most powerful curl, hehe
Here is the example code for querying the domain name in the million grid
Copy the Code code as follows:
$DN = $_get[' dn ']; Domain name, not including www
$ex = $_get[' ex ']; Top-level domain names, such as. com,. cn, including the front.
Query whether the domain name has been registered
$url = ' http://pandavip.www.net.cn/check/check_ac1.cgi ';
$ch = Curl_init ($url);
curl_setopt ($ch, Curlopt_post, true); POST
curl_setopt ($ch, Curlopt_postfields, ' domain= '. $dn. $ex);
curl_setopt ($ch, Curlopt_useragent, ' mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) gecko/20100101 firefox/8.0 ');
curl_setopt ($ch, Curlopt_cookie, ' __utma=1.1486902564.1322109246.1322109246.1322109246.1; __utmz= 1.1322109246.1.1.utmcsr= (direct) |utmccn= (direct) |utmcmd= (none); Adsource=google%u641c%u7d22; adwordid=gg96011009070005; __utmc=1 ');
curl_setopt ($ch, Curlopt_httpheader, Array (
' X-requested-with ' = ' xmlhttprequest ',//set to Ajax mode
' Referer ' = ' http://pandavip.www.net.cn/cgi-bin/Check.cgi?queryType=0&domain1= '. $dn. &image.x=0& Image.y=0&domain= '. $dn. ' &big5=n&sign=2&url=www.net.cn& ' trim ($ex, '. '). ' =yes '//Imposter, hehe
));
Curl_exec ($ch); Return the query results to the front end, using JS processing
The above describes the PHP Xmlhttprequestajax can not set a custom Referer solution, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.