php教程|php手册
php,获取,远程,网页,内容,函数,php,curDomain,SERVER,HTTP,HOST,strHTML,
php教程-php手册
$curDomain = $_SERVER[‘HTTP_HOST’];
$strHTML = file_get_contents(‘/DomainParking.asp?gDomName=’.$curDomain);
echo $strHTML
?>
早就在网上看到说file_get_contents不稳定,果然碰到了。。。
另一方面也说明了程序的容错性很差啊。。。
恩,言归正传吧。
碰到的是这个错误:
file_get_contents(http://***.php): failed to open stream: HTTP request failed!
G一下,决定用curl
域名停放源码,ubuntu下使用vpn,jsp tomcat连接池,基于java爬虫,php开发公众号类,吾爱seolzw