GAE抓取網頁的方法?

Posted by on | |


原本習慣用snoopy來抓取網頁的資料,但上到GAE平台後,不知為何會出現底下的錯誤??

PHP Warning:  fsockopen(): php_network_getaddresses: gethostbyname failed.
PHP Warning:  fsockopen(): unable to connect to xxxx.com:80 (php_network_getaddresses: gethostbyname failed. errno=0)




懶的去找原因,就先用php原本的方法,

return file_get_contents($url);

就可以取得資料了。

0 意見: