About PHP to collect a page a certain number of questions, please help to write a master
Source: Internet
Author: User
About PHP to collect a page a number of questions, please help to write a master
I now want to make a Web site, need to remotely get a Web site query results, I wrote the regular some problems, always can't get the results of the desired query number. Please help the experts to solve the following:
Http://mytool.chinaz.com/baidusort.aspx?host=www.baidu.com
Above this is to query a domain name Baidu weight page, I just need to get the query structure in the "Baidu Weight of 9" This weight number,
My code is written like this:
function Baidu ($s) {
$baidu = "http://mytool.chinaz.com/baidusort.aspx?host=". $s;
$site =file_get_contents ($baidu);
Echo $site;
Preg_match (' How to write here ', $site, $count);
return $count [0];
}
$num 1=baidu ("http://www.baidu.com");
Echo ' website Baidu weights for '. $num 1;
?>
Ask a master is how to write, how to get that query Baidu weight value, thank you
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.