1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need PHP page rank checking script.

Discussion in 'PHP' started by WM7, May 7, 2007.

  1. #1
    Anyone know where I can get a php script for getting the pagerank of a page?

    Or a tutorial to create one?
    I need to setup te script so it check the PR of all the url in my database and writes the pr of each of them. thanks in advance
     
    WM7, May 7, 2007 IP
  2. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Subikar, May 7, 2007 IP
  3. WM7

    WM7 Peon

    Messages:
    778
    Likes Received:
    112
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Script taken offline.
     
    WM7, May 7, 2007 IP
  4. ErectADirectory

    ErectADirectory Guest

    Messages:
    656
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Please be advised that automated querying is against Google's TOS and will get you banned.

    The script was taken offline because it doesn't run on most servers huh. I read that to mean that shared servers outlaw (therefore block) the script because it gets the whole server & all domains inside banned from Google.

    If you intend on doing this I would STRONGLY suggest that you find the script and install it on a remote server. Be advised, when you query do it on a delay, auto-querying for 100's of sites at 1 time looks unnatural to google's servers and will result in auto ban. Also, write the script so that it uses the checksum algo found in the toolbar, anything else will get caught in a hurry.

    Good luck on this, it is one of my tools in my bag of tricks so it is possible. I, however, will not post it online because of the potential harm it can do to people's sites & servers. If get the script, please use with caution. One day soon you are going to see a bunch of sites get banned for this ... are you listening directory owners??? I know it's a pretty green bar but is it really worth the risk?
     
    ErectADirectory, May 7, 2007 IP
  5. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #5
    There is a mail id send them a mail for code.
     
    Subikar, May 7, 2007 IP
  6. Phooey

    Phooey Active Member

    Messages:
    413
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    80
    #6
    Strictly out of curiosity, if SEO lookup tools are frowned upon by Google, why does just about every SEO site offer a lookup tool without issue?
     
    Phooey, May 14, 2007 IP
  7. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #7
    coderbari, May 14, 2007 IP
  8. ErectADirectory

    ErectADirectory Guest

    Messages:
    656
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #8
    First of all, About this ...
    I'm not doubting that it works but I downloaded the source & looked around (didn't install) and there was no call to google's servers throughout any of the files. It did make a call here ==> http://www.progen.com.tr/, so I assume they do the auto querying for you.

    While I applaud a site for risking their credibility (not to mention a ban from google) so that you can check the page rank of any page you want, I must say that calling it open source is a bit misleading. The call being made to google is not included in the code, nor is the formula for the checksum. So it's open source meaning "here look at the code, see it's worthless" not open source meaning "here's how to do it and here is the exact code for it". Free beer without the speech. Mind you, this is not saying it does not work, it's just probably not the script you are looking for.

    I'm going to break down the url that SEO Quake uses to call google's server so you can see what I mean.

    http://toolbarqueries.google.com/se...s=Rank&q=info:http://forums.digitalpoint.com/

    Which returns "Rank_1:1:6". As you guessed the 6 at the end is the pagerank. Go ahead and visit that url and see for yourself. Now, for the important part of the url above, "ch=63126022797". This is a unique number that is formulated by a very complex arithmetical formula that represents the url being queried, in this case "forums.digitalpoint.com". Long ago, this formula was originally stripped from the program embedded in the google toolbar so the call can be made to google's servers by a website while google thinks it is from a toolbar. The number is called a checksum and is required if you want to make the call more than a few times without getting your ip banned. So, from google's server's point of view, if the checksum = the url then all is well and they return "Rank_1:1:6".

    Awesome question, but frankly each different webmaster would probably give you a different answer. The most common sites that display PR would be directories. Directory owners feel that PR = advertising money so they risk the ban because it means cash to them, though many of them don't care enough to even realize it's wrong. Why does SEOmoz, pagerank.info and all the other sites do this and risk the ban, because it means visitors and visitors = advertising money.

    Now let me be perfectly clear, auto-querying google does not mean jail time or even a harsh fine, it means they reserve the right to ban your site from the search results. Will they always ban you ... no, I'm sure the punishment fits the crime and a temporary ban would come first.

    To some site owners, that wouldn't be much more than a slap on the wrist, to others it could cost them 10's of 1,000's of dollars annually. When you attempt to do this, be smart about it and make sure the end justifies the means.

    Feel free to read google's T&C, especially the part about automated queries to google's servers (which is exactly what we are talking about) and make the call for yourself as to if you want to risk this or not.

    A bit of a side topic but the automated queries part applies to google's search results also, so checking your ranking or how many pages of your site are indexed on the google engine is just as bad as checking for PR. I guess the only difference is that your SERPs actually mean something and PR is simply a worthless number.

    Hope this helps someone and sorry to be so long-winded.
     
    ErectADirectory, May 15, 2007 IP
    Phooey likes this.
  9. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #9
    That's just the code to check the PageRank of "progem.com.tr".. if you check the class (which is all over the internet) you'll see it is indeed querying Google servers.

    
    var $googleDomains = Array("toolbarqueries.google.com","www.google.com","toolbarqueries.google.com.tr","www.google.com.tr","toolbarqueries.google.de","www.google.de", "64.233.187.99", "72.14.207.99");
    
    PHP:
    Though lately Google has been cracking down on this and switching up their algorithm.. so a lot of the scripts are broken.. I didn't test Coderbari's so I don't know if his works.

    Cheers,
    Cody
     
    CodyRo, May 15, 2007 IP
    ErectADirectory likes this.
  10. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #10
    the open source scripts which are uploaded in my site are all well rated and top downloaded works of the site named phpclasses.org.they are not my work.as they are freeware or GPL so i uploaded them in site.
    the reason i uploaded them in my site:
    for downloading any script from phpclasses.org you have to be a member and you have to login.
    i am a member of that site and i found so much help from that site.and i shared these scripts in my site.i didn't check some of them.as i saw Googlepagerankchecker is well rated and downloaded script so i upload it in my site.
    I am not the author of the open source scripts in my site.i am just a user of most of those scripts,i got help from them and i want the other who are not members of phpclasses.org may have help fromthese scripts.
     
    coderbari, May 15, 2007 IP
  11. chilli_source

    chilli_source Active Member

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #11
    agreed, phpclasses.org is an excellent resource :eek:
     
    chilli_source, May 15, 2007 IP
  12. ErectADirectory

    ErectADirectory Guest

    Messages:
    656
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #12
    coderbari, This was not a strike against you. I have no probelm with you posting something that works, you added something to this thread than 1000's of other DPers (including me) didn't. No harm no foul. I'm just doing my part to try and keep others out of trouble

    You see, the problem with forums is that many users don't really program and will install anything that might work without looking over it. I consider myself giving it the once over to be a public service.

    You are absolutely right, the call was for the domain not to it. This takes some of the nobility away from what they is doing though.

    I guess my searching skills are getting rusty because I really can't connect the dots here. I saw the google urls (1st few lines of the class) but the array $googleDomains is not used anywhere else in the script. At the time I felt it was just a smokescreen because they never included the checksum part, I felt they just used their server as a middle man of the process.

    Here is what I did.
    A> Find "google.com/" and found 2 occurrences , both in the comments of class.googlepr.php.
    B> Find "$googleDomains" and the only occurrence was where it was declared at the top of class.googlepr.php, the one you posted

    Next question ... How about the checksum? from my brief looking around I found this "ch=6". Surely they are not saying that the checksum is always 6 are they? As I said, I have a working script so I have actually seen how confusing the equation is. G hires some very smart people for sure.

    I do know that they have changed their algo for getting the checksum twice since releasing the Google tool bar. I think it coincided with new browser releases though. If you have any blog or article to point me to I would LOVE to read for myself what you are speaking about, very interested.

    My initial thoughts on that lost comment that I quoted is that people are using this script and getting the ban because the checksum is not right. That is just my opinion and I am wrong quite a bit these days.

    Again, I only spend a few minutes last night (and now a few today) looking over this script and am not calling it a fraud, just questioning it's functionality. I have no doubt that it works, I'm just looking into how & why it works. That part is more important to me.
     
    ErectADirectory, May 16, 2007 IP
  13. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #13
    The reason you couldn't find another referance to $googleDomains was because he was pulling it using $this->googleDomains, and assigned it to $host in the GetPR() function.

    
    $host = $this->googleDomains[mt_rand(0,count($this->googleDomains)-1)];
    
    PHP:
    As for the checksums / algorithm stuff.. I can't even begin to comprehend or explain the mystery that is Google, though I don't believe people are getting banned for using old outdated scripts (which in return would produce a wrong checksum).. though that could explain why some top "SEO Tools" sites are having issues with their PageRank tools (IWebTool, etc).
     
    CodyRo, May 16, 2007 IP
  14. wannaknow

    wannaknow Member

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #14
    "Though lately Google has been cracking down on this and switching up their algorithm.. so a lot of the scripts are broken.. I didn't test Coderbari's so I don't know if his works. "

    indeed, this script is not returning correct PR anymore - it always returns "1"
    any knows about working open-source php pagerank checking script ?
     
    wannaknow, May 19, 2007 IP