GAE抓取網頁的方法?
原本習慣用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);
就可以取得資料了。
訂閱:
張貼留言 (Atom)
0 意見:
張貼留言