nxnghe-git / seostats

Automatically exported from code.google.com/p/seostats
0 stars 0 forks source link

google page rank check produces non-valid hash #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running the script as normal
2. Calling the Google Page Rank via $url->Google_Page_Rank()

What is the expected output? What do you see instead?
Should see a number, but get this instead:
"Failed to generate a valid hash for PR check."

What version of the product are you using? On what operating system?
Version 2.0.2, on both localhost and live servers.

Original issue reported on code.google.com by alienwe...@gmail.com on 9 Mar 2011 at 11:00

GoogleCodeExporter commented 9 years ago

Original comment by eyecatchup@gmail.com on 13 Mar 2011 at 3:05

GoogleCodeExporter commented 9 years ago
Need more information to reproduce (and fix) this problem:

1.) Are you using the Pagerank API?
2.) Do you get the error for a specific URL only, or for all?
3.) If you're getting the error for a specific URL only, what URL is that?

PS: You can check whether the Pagerank API works for your URL by browsing 
directly to: http://api.nahklick.de/pagerank/ch.php?url=http://www.google.com

Original comment by eyecatchup@gmail.com on 13 Mar 2011 at 3:12

GoogleCodeExporter commented 9 years ago

Original comment by eyecatchup@gmail.com on 17 Mar 2011 at 11:31

GoogleCodeExporter commented 9 years ago
the URL is shutdown.. is there any answer for this? I'm having the same problem

Original comment by gojen...@gmail.com on 1 Jun 2011 at 12:50

GoogleCodeExporter commented 9 years ago
I have the same problem. Is there any solution ?

Original comment by Alexandr...@gmail.com on 14 Oct 2011 at 11:11

GoogleCodeExporter commented 9 years ago
It's getting the domain PR but not the Page PR. If I set the page URL 
(hardcode) in the function it shows for some and for some it says "Failed to 
generate a valid hash for PR check."

Original comment by bella6...@gmail.com on 27 Nov 2011 at 2:41

GoogleCodeExporter commented 9 years ago
I have been using SEOStats for a couple months and its been working fine. 
Always returning PageRanks. 

For the past 3 days I always get Failed to generate a valid hash for PR check.

Has something changed?

Original comment by k...@autobacklinkservice.com on 16 Dec 2011 at 6:52

GoogleCodeExporter commented 9 years ago
I confirm having the same issue.

Original comment by armand.b...@gmail.com on 26 Dec 2011 at 9:34

GoogleCodeExporter commented 9 years ago
This is still an issue in the latest.

I found that by replacing the function Google_PR in seostats.google.php to the 
following fixes the issue.

function Google_PR($q,$host='toolbarqueries.google.com',$context=NULL) 
    {   
    $seed = "Mining PageRank is AGAINST GOOGLE'S TERMS OF SERVICE. Yes, I'm talking to you, scammer.";  
    $result = 0x01020345;   
    $len = strlen($q);  
    for ($i=0; $i<$len; $i++) {     
    $result ^= ord($seed{$i%strlen($seed)}) ^ ord($q{$i});      
    $result = (($result >> 23) & 0x1ff) | $result << 9; }   
    $ch=sprintf('8%x', $result);        
    $url='http://%s/tbr?client=navclient-auto&ch=%s&features=Rank&q=info:%s';   
    $url=sprintf($url,$host,$ch,$q);    @$pr=file_get_contents($url,false,$context);    
    return $pr?substr(strrchr($pr, ':'), 1):false;
    }

Original comment by stathr...@gmail.com on 19 Jan 2012 at 9:45

GoogleCodeExporter commented 9 years ago
Update for the Pagerank: I had some legal issues that enforced me to shut doen 
my blog. The Pagerank Checksum API was hosted on the same server, so it went 
offline in early december 2011. Anyway the Pagerank method itself still works. 
Unlike strathread suggested, the only thing you need to change is the default 
setting for "USE_PAGERANK_CHECKSUM_API" in the config file. When you set it 
from true to false, it will use the inbuilt method to calculate the checksum, 
rather than requesting it from the API. You can download the latest version at 
GitHub, where i updated the default setting, or change it manually: 
https://github.com/eyecatchup/SEOstats/blob/master/src/class.seostats.config.php
#L23

If you have any further issues, please report them on GitHub: 
https://github.com/eyecatchup/SEOstats/issues

Thanks.

Original comment by eyecatchup@gmail.com on 29 Jan 2012 at 6:12

GoogleCodeExporter commented 9 years ago
Implemented an alernative calculation for the checksum calculation for the 
Pagerank request. If you still get "Failed to generate a valid hash for PR 
check.", open class.seostats.config.php and set "USE_PAGERANK_CHECKSUM_ALT" to 
true.

Original comment by eyecatchup@gmail.com on 29 Jan 2012 at 7:03

GoogleCodeExporter commented 9 years ago
Thnks for the script.

Original comment by karthik....@gmail.com on 21 Mar 2012 at 7:54

GoogleCodeExporter commented 9 years ago
it still gets the same error :(((

Original comment by bestwe...@gmail.com on 22 Apr 2012 at 1:43

GoogleCodeExporter commented 9 years ago
Hi, i have got a same problem. I'm using a latest version of seostats. 
"USE_PAGERANK_CHECKSUM_API" set false. I have installed that script a few month 
ago, I had no problem, but a last few weeks receiving errors on any domain. I 
have tried this "USE_PAGERANK_CHECKSUM_ALT" set to true. Did not help. Any ides 
what went wrong? Thanks

Original comment by andras.d...@gmail.com on 24 Apr 2012 at 10:08

GoogleCodeExporter commented 9 years ago
I have same problem, the googleurl is

http://toolbarqueries.google.com/tbr?features=Rank&sourceid=navclient-ff&client=
navclient-auto-ff&googleip=O;66.249.81.104;104&ch=8fffffffffffffeffffffff&q=info
:http%3A%2F%2Fhealthcare.com

The error was

403. That’s an error.

Your client does not have permission to get URL /tbr? ... from this server. 
(Client IP address: ...)

Original comment by cna...@xyznetworkinc.com on 10 May 2012 at 11:47

GoogleCodeExporter commented 9 years ago
Forbidden

You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an 
ErrorDocument to handle the request.
Apache Server at seo.api.xxxxx.com Port 80

===================================

i always got this result... why?

Original comment by camilo...@innermaxsupport.com on 28 May 2012 at 7:24