Domain Name Lookup by IP address, which is usually an IP address query function of bing, that is, IP Address: 222.222.222.222
Writing php code becomes
<? Php
// Call Method
$ Result = getResult ("124.205.228.114 ");
Print_r ($ result );
Function getContent ($ url ){
$ Content = file_get_contents ($ url );
Return $ content;
}
Function getResult ($ ip ){
$ Pagesize = 10;
$ Page = 1;
$ Url = "http://cn.bing.com/search? Q = ip % 3A $ ip & first = $ page ";
$ Result = array ();
Do
{
$ Url = "http://cn.bing.com/search? Q = ip % 3A $ ip & first = $ page ";
$ Content = getContent ($ url );
$ Pattern = "/<cite> ([a-zA-Z0-9 \.] *) (? :\/.*)? <\/Cite>/isU ";
Preg_match_all ($ pattern, $ content, $ matches );
$ Result = array_merge ($ result, $ matches [1]);
$ Nextpage = strpos ($ content, "Next page ");
$ Page = $ page + $ pagesize;
} While ($ nextpage );
$ Result = array_values (array_unique ($ result ));
Return $ result;
}
?>
<? Php
// Call Method
$ Result = getResult ("124.205.228.114 ");
Print_r ($ result );
Function getContent ($ url ){
$ Content = file_get_contents ($ url );
Return $ content;
}
Function getResult ($ ip ){
$ Pagesize = 10;
$ Page = 1;
$ Url = "http://cn.bing.com/search? Q = ip % 3A $ ip & first = $ page ";
$ Result = array ();
Do
{
$ Url = "http://cn.bing.com/search? Q = ip % 3A $ ip & first = $ page ";
$ Content = getContent ($ url );
$ Pattern = "/<cite> ([a-zA-Z0-9 \.] *) (? :\/.*)? <\/Cite>/isU ";
Preg_match_all ($ pattern, $ content, $ matches );
$ Result = array_merge ($ result, $ matches [1]);
$ Nextpage = strpos ($ content, "Next page ");
$ Page = $ page + $ pagesize;
} While ($ nextpage );
$ Result = array_values (array_unique ($ result ));
Return $ result;
}
?>
From gaohui blog