您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

curl的一些小疑点

2025/6/25 1:21:24发布22次查看
curl的一些小问题
请教一下把一个网页的某部分内容抓取出来是怎么实现的...没有思路....
比如说我想抓取mmcfood.1x.net里面的表格...其他的都不要..
------解决方案--------------------
php code$ch = curl_init();curl_setopt($ch, curlopt_url, 'http://mmcfood.1x.net/');curl_setopt($ch, curlopt_returntransfer, 1);curl_setopt($ch, curlopt_useragent, 'mozilla/5.0 (windows; u; windows nt 6.1; en-us; rv:1.9.1.2) gecko/20090729 firefox/3.5.2 gtb5');$htmls = curl_exec($ch);curl_close($ch);preg_match(#
]*)>(.*?)
#is, $htmls, $matches);echo $matches[0];
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product