[英]Which method is best for retrieving information from custom fields in a Wordpress post to be displayed on another page?
[英]Retrieving information from another page
我正在考虑一种发送请求到页面,并从页面接收请求然后读取它的方法。 问题是我不知道什么是最有效的方法。
$result=file_get_contents('scan_results.php');
$scanning=true;
while($scanning){
if(stristr($result,'Nothing to scan.')){
$scanning=false;
}
}
现在,我只是向页面发送一个请求,然后尝试在页面上抓取句子“没有要扫描的内容”。
页面scan_results.php应该执行一些任务,因此我将其循环播放直到得到“没有要扫描的东西”。因此,基本上,我正在考虑使用一种更好的方法来检查何时得到没有要扫描的句子。
尝试使用cURL: http : //php.net/manual/zh/book.curl.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.