作者dowbatw (Dowbatw)
看板PHP
標題[請益] PHP抓網頁很慢
時間Tue Aug 12 20:11:43 2008
最近因為奧運的關係
所以寫了程式想要抓住京奧官方網站上各個中華隊的比賽訊息
可是發現一點很奇怪的是
不論是 fopen, file, file_get_contents, curl
抓的速度都相當的慢(和瀏覽器相比速度相差相當的大)
我還用了一些別人寫好的程式讓我可以掛 proxy 抓網頁
可是效能依然不彰
不知道版上有沒有高手對這個有經驗的?
感謝各位
--
"The primary and necessary object of all existence is to be happy, but
happiness cannot be obtained individually; it is useless to expect isolated
happiness; all must partake of it, or the few will never enjoy it."
- Robert Owen (1771-1858)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.170.89.72
1F:推 visualPHP :妳的嫚是多嫚 還有抓很慢最後有抓下來嗎 08/12 20:27
3F:→ dowbatw :十秒(ctrl+F5,含圖片),PHP的FILE()耗時約兩倍以上 08/12 20:40
4F:→ dowbatw :都有proxy 08/12 20:40
5F:→ dowbatw :PHP用的是 class.Snoopy 08/12 20:42