无法获取超链接
$url="http://ca178.qjwm.com/";
[email protected]($url,"r") or die("超时");
$fcontents=file_get_contents($url);
print_r($fcontents);
preg_match_all('/.*邀请.*/i', $fcontents, $matches);
print_r($matches);
我想获取含有邀请关键词的链接,但是一直是空的,求指导
------解决方案--------------------
这样试试'#<a.*href=[\'"](.*)[\'"].*>.*邀请.*</a>#is'
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号