奇怪的抓取结果,该怎么解决

WBOY
Release: 2016-06-13 10:14:47
Original
1095 people have browsed it

奇怪的抓取结果
我想抓取http://www.sctport.com.cn/newsctsite/sct/cntrnoplan.jsp?ToPage=1这个页面的表格内容,但奇怪了,为什么只能抓取中文的部分,不能抓取英文的部分?太奇怪了。 用SNOOPY类,代码如下: 高手帮忙看看啊,我郁闷死了。

include("Snoopy.class.php");  
$snoopy = new Snoopy;
$snoopy->fetch("http://www.sctport.com.cn/newsctsite/sct/cntrnoplan.jsp?ToPage=1"); 
preg_match_all('/(.*?)/i',$snoopy->results,$d);
for ($i=0;$i echo $i; echo "----";
 ECHO $d[1][$i]."
";
}

只抓取了中文的部分,英文的,日期的,都没抓出来,不知道怎么回事?

------解决方案--------------------

探讨
PHP code
$str=file_get_contents('http://www.sctport.com.cn/newsctsite/sct/cntrnoplan.jsp?ToPage=1');
preg_match_all('/(.*?)/is',$str,$matches);
print_r($matches);

------解决方案--------------------
preg_match_all('/(.*)/isU',$snoopy->results,$d);

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template