Hi, Is there a way for me to quickly tally up the PRs for all the pages within a site. E.g., quick calculate for mysite.com the following stat: PR 6: 0 pages PR 5: 7 pages PR 4: 20 pages ... PR 0: 120 pages Thanks.
No tool that I know of that does that. Could be a great tool to have btw! just checked my personal archives: getting Google PR with a script is against the Google ToS, and can get your IP banned etc etc. anyone trying to build a tool like this: make it a windows program so people have to use their own IP to do the actual PR retreiving!! I don't have the time right now to write it, but just my ideas: * get a crawler to collect all unique pages withing a site/domain * make a list of the top 100 pages of that site/domain * query google for the PageRank (using previously posted scripts) * dump a list of PR per Page and * send me a copy of your executable
In case anyone is still interested, I wrote a function to accomplish this: http://www.icemelon.com/php/site_pageranks.htm (You may also want to read the accompanying tutorial so that you can easily tweak the code and stuff: http://www.icemelon.com/tutorials/24/Crawl_Your_Site_for_PageRanks.htm)
The function google_pagerank works very well at my localhost that is Win XP + PHP 5.1.2, but at my host (which is Linux + PHP 4.4.2) it does not calculate the right CH value for the quey URL so I get sth like this: Warning: fopen(http://www.google.com/search?client=navclient-auto&ch=62147525222&features=Rank&q=info:http://www.nutang.com): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/wprkxcwx/public_html/pr-test.php on line 108 0 The reason is the wrong value 62147525222 for url http://www.nutang.com. I have figured out that the bitwise XOR operator ^ does not work right at my server. Do you have any idea or work around for this problem? PS: I have also written the exact problem at comp.lang.php: http://groups.google.com/group/comp.lang.php/browse_thread/thread/b2d5cabde76b277f/#
I have solved the problem at last. It was an issue about the differences between 32bit and 64bit systems. Anyone has the same issue head to this forum page, they are great http://www.mobileread.com/forums/showthread.php?t=1670&page=18&pp=15