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

PHP的curl_init采摘获取内容实例教程

2024/4/6 22:53:34发布13次查看
php的curl_init采集获取内容实例教程
// 1. 初始化
$ch = curl_init();
// 2. 设置选项,包括url
curl_setopt($ch, curlopt_url, http://www.kekeka.com);
curl_setopt($ch, curlopt_returntransfer, 1);
curl_setopt($ch, curlopt_header, 0);
// 3. 执行并获取html文档内容
$output = curl_exec($ch);
// 4. 释放curl句柄
curl_close($ch);
curl_setopt中的curlopt_url,curlopt_returntransfer等参数,请参考php文档手册,里面有详细说明!
现在得到$output内容..使用正则表达式匹配出你需要的内容
该用户其它信息

VIP推荐

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