1
august 2013 年 11 月 4 日
抓取內容的如果不考濾性能,curl 下來用 simplehtmldom 一般都可以搞掂了
|
3
lvye 2013 年 11 月 4 日
curl有https的设置选项啊
|
4
august 2013 年 11 月 4 日
http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/
The quick fix curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
5
mahone3297 2013 年 11 月 4 日
@august 这个意思就是不用ssl验证?
|
6
august 2013 年 11 月 4 日
@mahone3297 yes, 官网里 CURLOPT_SSL_VERIFYPEER 有说明: FALSE to stop cURL from verifying the peer's certificate.
|
7
lizheming 2013 年 11 月 4 日
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); 抓取的时候加上这两个就没有问题了吧~ |
8
tension OP 其实最麻烦的是正则的匹配!!!
我对正则一窍不通!! |
10
mahone3297 2013 年 11 月 5 日
@tension http://deerchao.net/tutorials/regex/regex.htm 看这个,30分钟哦,当然是骗你的。。。
|
11
kasp 2013 年 11 月 5 日
试一下phpquery吧,简单,强大。
|
12
iamdbc 2013 年 11 月 5 日
你把具体要求贴出来吧
|
14
jjplay 2013 年 11 月 5 日
phpquery +1
但是数据量大的时候 会很卡 |
15
Loveyuki 2013 年 11 月 7 日
为啥用正则? 现成的 PHP Simple HTML DOM Parser 比正则好用百倍。
|