? Php * php: complete example of getting the website's Google prvalue * functionapp_hash_url ($ url) {$ seedMiningPageRankisAGAINSTGOOGLESTERMSOFSERVICE .; $ result0x01020345; for ($ i0; $ istrlen ($ url); $ I ++) {$ result ^ ord ($ seed {$ I % 87 }) ^ ord ($ url {$ I}); $ result ($ result23) 0x1F
? Php/* php get the complete GOOGLE prvalue example */function app_hash_url ($ url) {$ seed = "Mining PageRank is against google's terms of service. "; $ result = 0x01020345; for ($ I = 0; $ istrlen ($ url); $ I ++) {$ result ^ = ord ($ seed {$ I % 87}) ^ ord ($ url {$ I}); $ result = ($ result23) 0x1F
> 23) & 0x1FF) | $ result <9;} return sprintf ("8% x", $ result);} function get_pr ($ url) {$ PR_CH = app_hash_url ($ url); $ url = 'HTTP: // toolbarqueries.google.com/tbr? Client = navclient-auto & features = Rank & q = info :'. $ url. '& ch = '. $ PR_CH; $ prtext = file_get_contents ($ url); if ($ prtext! = "") {$ Pr = explode (":", $ prtext); echo $ pr [2] ;}else {echo 0 ;}} echo get_pr ("zc520.cc") ;?>
Original article address: the latest google prvalue query interface php version example, thank you for sharing.