做某alexa站的小偷程序,遇到一些基础问题。
一、应注意用curl而不是file_get_contents,file_get_contents会遗漏数据。
二、使用file_get_contents前面需要加@,这样不会因为出错而导致整个程序瘫痪。
三、file_get_contents采集图片时,不用担心跳转链接,只要能显示图片,任何链接用file_put_contents拷下来就可以。
做某alexa站的小偷程序,遇到一些基础问题。
一、应注意用curl而不是file_get_contents,file_get_contents会遗漏数据。
二、使用file_get_contents前面需要加@,这样不会因为出错而导致整个程序瘫痪。
三、file_get_contents采集图片时,不用担心跳转链接,只要能显示图片,任何链接用file_put_contents拷下来就可以。
相关文章: