Ec (2); $ qstrtolower (trim ($ _ GET [q]); $ qmatchdomain ($ q); if ($ q) {exit;} functionmatchdomain ($ q) {preg_match ([a-z0-9] w }? [A-z0-9] | [a-zA-Z0-9]).) {1,} (aero | arpa | asia | biz | cat | com | coop | c script ec (2); script
$ Q = strtolower (trim ($ _ GET ['q']);
$ Q = matchdomain ($ q );
If ($ q = '') {exit ;}
Function matchdomain ($ q ){
Preg_match ('/([a-z0-9] w }? [A-z0-9] | [a-zA-Z0-9]).) {1 ,} (aero | arpa | asia | biz | cat | com | coop | co | edu | gov | info | int | jobs | mil | mobi | museum | name | net | org | pro | tel | travel | [a-z] [a-z]) (. [a-z] [a-z]) {0, 1}/', $ q, $ matches );
Return $ matches [0];
}
For ($ I = 0; $ I <5; $ I ++ ){
$ Pagecode = @ file_get_contents ("http://www.baidu.com/s? Rn = 1 & wd = site: ". $ q );
If ($ pagecode ){
Break;
}
}
If ($ pagecode ){
Preg_match ('/Baidu, find the relevant webpage (about )? (.*?) , Time/', $ pagecode, $ baidus );
If ($ baidus [2]) {
$ Sitebaidu = $ baidus [2];
} Else {
$ Sitebaidu = 0;
}
Echo"