SEO Forums












                                          
User   Password   remember   (register)  ?

Pagerank checker script problem


Back to google pagerank.


guest-ralfie    (2008-11-05)
 
Pagerank checker script problem



Hi,

I try to use the free pagerank checker class from Rick Lim, but I encounter this problem under PHP 5 (EasyPHP 2.0b1, Windows Vista) while it works fine under PHP 4 on a previous version of EasyPHP :

Fatal error: Call to undefined method rank::functions() in C:Program FilesEasyPHP 2.0b1wwwfunctions.class.php on line 145


The line that causes the problem :

function __construct () {
$this->functions();
}


Here is the Pagerank checker script : rank.class.php

<?php
include 'functions.class.php';
class rank extends functions {
var $url;
var $pagerank;
var $alexa_rank;
var $backlinks = array('google' => '', 'yahoo' => '', 'msn' => '', 'altavista' => '', 'alltheweb' => '');
var $dmoz;

#start
function __start () {
$this->url = preg_replace('/http:///si', '', $this->url);
$this->pagerank = $this->__pagerank();
$this->alexa_rank = $this->__alexa_rank();
$this->backlinks['google'] = $this->__backlinks('google');
$this->backlinks['yahoo'] = $this->__backlinks('yahoo');
$this->backlinks['msn'] = $this->__backlinks('msn');
$this->backlinks['altavista'] = $this->__backlinks('altavista');
$this->backlinks['alltheweb'] = $this->__backlinks('alltheweb');
}

function cleanup () {
$this->pagerank = $this->format_number($this->pagerank);
$this->alexa_rank = $this->format_number($this->alexa_rank);
$this->backlinks['google'] = $this->format_number($this->backlinks['google']);
$this->backlinks['yahoo'] = $this->format_number($this->backlinks['yahoo']);
$this->backlinks['msn'] = $this->format_number($this->backlinks['msn']);
$this->backlinks['altavista'] = $this->format_number($this->backlinks['altavista']);
$this->backlinks['alltheweb'] = $this->format_number($this->backlinks['alltheweb']);
}

#pagerank
function __pagerank () {
$url = 'info:' . urldecode($this->url);
$checksum = $this->checksum($this->strord($url));
$url = 'http://www.google.com/search?client=navclient-auto&ch=6' . $checksum . '&features=Rank&q=' . $url;
$v = file_get_contents($url);
preg_match('/Rank_([0-9]+):([0-9]+):([0-9]+)/si', $v, $r);
return ($r[3]) ? $r[3] : '0';
}

#alexa_rank
function __alexa_rank () {
$url = 'http://data.alexa.com/data?cli=10&dat=snbamz&url=' . urlencode($this->url);
$v = file_get_contents($url);
preg_match('/<popularity url="(.*?)" TEXT="([0-9]+)"/>/si', $v, $r);
return ($r[2]) ? $r[2] : '0';
}

#backlinks
function __backlinks ($engine) {
switch ($engine) {
#google
case 'google':
$url = 'http://www.google.com/search?q=link%3A' . urlencode($this->url);
$v = file_get_contents($url);
preg_match('/of about <b>([0-9,]+)</b>/si', $v, $r);
return ($r[1]) ? str_replace(',', '', $r[1]) : '0';
break;
#yahoo
case 'yahoo':
$url = 'http://search.yahoo.com/search?p=links%3A' . urlencode($this->url);
$v = file_get_contents($url);
preg_match('/of about ([0-9,]+)/si', $v, $r);
return ($r[1]) ? str_replace(',', '', $r[1]) : '0';
break;
#msn
case 'msn':
$url = 'http://search.msn.com/results.aspx?q=link%3A' . urlencode($this->url);
$v = file_get_contents($url);
preg_match('/of ([0-9,]+) results/si', $v, $r);
return ($r[1]) ? str_replace(',', '', $r[1]) : '0';
break;
#altavista
case 'altavista':
$url = 'http://www.altavista.com/web/results?q=link%3A' . urlencode($this->url);
$v = file_get_contents($url);
preg_match('/found ([0-9,]+) results/si', $v, $r);
return ($r[1]) ? str_replace(',', '', $r[1]) : '0';
break;
#alltheweb
case 'alltheweb':
$url = 'http://www.alltheweb.com/search?q=link%3A' . urlencode($this->url);
$v = file_get_contents($url);
preg_match('/<span class="ofSoMany">([0-9,]+)</span>/si', $v, $r);
return ($r[1]) ? str_replace(',', '', $r[1]) : '0';
break;
}
}
}
?>


functions.class.php

<?php
class functions {
function to_int_32 (&$x) {
$z = hexdec(80000000);
$y = (int) $x;
if($y ==- $z && $x <- $z){
$y = (int) ((-1) * $x);
$y = (-1) * $y;
}
$x = $y;

function zero_fill ($a, $b) {
$z = hexdec(80000000);
if ($z & $a) {
$a = ($a >> 1);
$a &= (~$z);
$a |= 0x40000000;
$a = ($a >> ($b - 1));
} else {
$a = ($a >> $b);
}
return $a;
}
function mix($a, $b, $c) {
$a -= $b; $a -= $c; $this->to_int_32($a); $a = (int)($a ^ ($this->zero_fill($c,13)));
$b -= $c; $b -= $a; $this->to_int_32($b); $b = (int)($b ^ ($a<<8));
$c -= $a; $c -= $b; $this->to_int_32($c); $c = (int)($c ^ ($this->zero_fill($b,13)));
$a -= $b; $a -= $c; $this->to_int_32($a); $a = (int)($a ^ ($this->zero_fill($c,12)));
$b -= $c; $b -= $a; $this->to_int_32($b); $b = (int)($b ^ ($a<<16));
$c -= $a; $c -= $b; $this->to_int_32($c); $c = (int)($c ^ ($this->zero_fill($b,5)));
$a -= $b; $a -= $c; $this->to_int_32($a); $a = (int)($a ^ ($this->zero_fill($c,3)));
$b -= $c; $b -= $a; $this->to_int_32($b); $b = (int)($b ^ ($a<<10));
$c -= $a; $c -= $b; $this->to_int_32($c); $c = (int)($c ^ ($this->zero_fill($b,15)));
return array($a,$b,$c);
}
function checksum ($url, $length = null, $init = 0xE6359A60) {
if (is_null($length)) {
$length = sizeof($url);
}
$a = $b = 0x9E3779B9;
$c = $init;
$k = 0;
$len = $length;
while($len >= 12) {
$a += ($url[$k+0] + ($url[$k+1] << 8) + ($url[$k+2] << 16) + ($url[$k+3] << 24));
$b += ($url[$k+4] + ($url[$k+5] << 8) + ($url[$k+6] << 16) + ($url[$k+7] << 24));
$c += ($url[$k+8] + ($url[$k+9] << 8) + ($url[$k+10] << 16) + ($url[$k+11] << 24));
$mix = $this->mix($a,$b,$c);
$a = $mix[0]; $b = $mix[1]; $c = $mix[2];
$k += 12;
$len -= 12;
}
$c += $length;
switch($len) {
case 11: $c += ($url[$k + 10] << 24);
case 10: $c += ($url[$k + 9] << 16);
case 9: $c += ($url[$k + 8] << 8);
case 8: $b += ($url[$k + 7] << 24);
case 7: $b += ($url[$k + 6] << 16);
case 6: $b += ($url[$k + 5] << 8);
case 5: $b += ($url[$k + 4]);
case 4: $a += ($url[$k + 3] << 24);
case 3: $a += ($url[$k + 2] << 16);
case 2: $a += ($url[$k + 1] << 8);
case 1: $a += ($url[$k + 0]);
}
$mix = $this->mix($a, $b, $c);
return $mix[2];
}
function strord($string) {
for($i = 0; $i < strlen($string); $i++) {
$result[$i] = ord($string{$i});
}
return $result;
}
//
//
//
function format_number ($number='', $divchar = ',', $divat = 3) {
$decimals = '';
$formatted = '';
if (strstr($number, '.')) {
$pieces = explode('.', $number);
$number = $pieces[0];
$decimals = '.' . $pieces[1];
} else {
$number = (string) $number;
}
if (strlen($number) <= $divat)
return $number;
$j = 0;
for ($i = strlen($number) - 1; $i >= 0; $i--) {
if ($j == $divat) {
$formatted = $divchar . $formatted;
$j = 0;
}
$formatted = $number[$i] . $formatted;
$j++;
}
return $formatted . $decimals;
}
function a1149154365 () {
$this->a1149154365();
}
function a1206352297 () {
$this->a1206352297();
}
function a1383382467 () {
$this->a1383382467();
}
function a1194196221 () {
$this->a1194196221();
}
function a1292845929 () {
$this->a1292845929();
}
function a1074728645 () {
$this->a1074728645();
}
function a1289598711 () {
$this->a1289598711();
}
function a1169299252 () {
$this->a1169299252();
}
function a1406842300 () {
$this->a1406842300();
}
function a1262993656 () {
$this->a1262993656();
}
function a1280534873 () {
$this->a1280534873();
}
function a1174485307 () {
$this->a1174485307();
}
function a1403698970 () {
$this->a1403698970();
}
function a1372831517 () {
$this->a1372831517();
}
function __construct () {
$this->functions();
}
function a1401054826 () {
$this->a1401054826();
}
function a1326644341 () {
$this->a1326644341();
}
function a1295120284 () {
$this->a1295120284();
}
function a1243184111 () {
$this->a1243184111();
}
function a1280038555 () {
$this->a1280038555();
}
function a1262029497 () {
$this->a1262029497();
}
function a1083121947 () {
$this->a1083121947();
}
function a1194444349 () {
$this->a1194444349();
}
function a1018449465 () {
$this->a1018449465();
}
function a1034539791 () {
$this->a1034539791();
}
function a1243328160 () {
$this->a1243328160();
}
function a1004293515 () {
$this->a1004293515();
}
function a1180466564 () {
$this->a1180466564();
}
function a1169734326 () {
$this->a1169734326();
}
function a1100566545 () {
$this->a1100566545();
}
function a1092828133 () {
$this->a1092828133();
}
function a1391125477 () {
$this->a1391125477();
}
function a1249720911 () {
$this->a1249720911();
}
function a1299180431 () {
$this->a1299180431();
}
function a1364442537 () {
$this->a1364442537();
}
function a1033851725 () {
$this->a1033851725();
}
function a1181960952 () {
$this->a1181960952();
}
function a1029105774 () {
$this->a1029105774();
}
function a1323450436 () {
$this->a1323450436();
}
function a1351260205 () {
$this->a1351260205();
}
function a1025882667 () {
$this->a1025882667();
}
function a1176378684 () {
$this->a1176378684();
}
function a1221729670 () {
$this->a1221729670();
}
function a1200367974 () {
$this->a1200367974();
}
function a1170012247 () {
$this->a1170012247();
}
function a1184495780 () {
$this->a1184495780();
}
function a1191357393 () {
$this->a1191357393();
}
function a1086591181 () {
$this->a1086591181();
}
function a1069550656 () {
$this->a1069550656();
}
function a1024476096 () {
$this->a1024476096();
}
function a1366629736 () {
$this->a1366629736();
}
function a1331580154 () {
$this->a1331580154();
}
function a1107598044 () {
$this->a1107598044();
}
function a1151008678 () {
$this->a1151008678();
}
function a1350029619 () {
$this->a1350029619();
}
function a1142137836 () {
$this->a1142137836();
}
function a1394336839 () {
$this->a1394336839();
}
function a1354323135 () {
$this->a1354323135();
}
function a1322604400 () {
$this->a1322604400();
}
function a1154005757 () {
$this->a1154005757();
}
function a1044824273 () {
$this->a1044824273();
}
function a1005367125 () {
$this->a1005367125();
}
function a1135065827 () {
$this->a1135065827();
}
function a1294545184 () {
$this->a1294545184();
}
function a1304547557 () {
$this->a1304547557();
}
function a1089442956 () {
$this->a1089442956();
}
function a1328396910 () {
$this->a1328396910();
}
function a1076443102 () {
$this->a1076443102();
}
function a1118548731 () {
$this->a1118548731();
}
function a1241781939 () {
$this->a1241781939();
}
function a1017637899 () {
$this->a1017637899();
}
function a1144431398 () {
$this->a1144431398();
}
function a1008095216 () {
$this->a1008095216();
}
function a1239367569 () {
$this->a1239367569();
}
function a1344799373 () {
$this->a1344799373();
}
function a1178107464 () {
$this->a1178107464();
}
function a1013797941 () {
$this->a1013797941();
}
function a1126091358 () {
$this->a1126091358();
}
function a1264698646 () {
$this->a1264698646();
}
function a1083348598 () {
$this->a1083348598();
}
function a1150567455 () {
$this->a1150567455();
}
function a1221262975 () {
$this->a1221262975();
}
function a1004863344 () {
$this->a1004863344();
}
function a1258165499 () {
$this->a1258165499();

}
function a1372271653 () {
$this->a1372271653();
}
function a1354892963 () {
$this->a1354892963();
}
function a1400303335 () {
$this->a1400303335();
}
function a1356543085 () {
$this->a1356543085();
}
function a1299150691 () {
$this->a1299150691();
}
function a1312842328 () {
$this->a1312842328();
}
function a1100483435 () {
$this->a1100483435();
}
function a1343974964 () {
$this->a1343974964();
}
function a1318209453 () {
$this->a1318209453();
}
function a1235549262 () {
$this->a1235549262();
}
function a1228454741 () {
$this->a1228454741();
}
function a1212691603 () {
$this->a1212691603();
}
function a1324992219 () {
$this->a1324992219();
}
function a1146786243 () {
$this->a1146786243();
}
function a1289134705 () {
$this->a1289134705();
}
function a1033475543 () {
$this->a1033475543();
}
function a1388568183 () {
$this->a1388568183();
}

}
?>



Thanks for your help !



(more options below)

admin    (2008-11-05 17:07:08)
Pagerank calculation

Check these links, very interesting stuff

http://www.thedeveloperday.com/php-google-pagerank-class-implementation/

http://www.juust.org/index.php/php-classes/php-class-pagerank/


ficgs
Suggestions

 Ajax PageRank (PR) Checker Script
sitetoolcenter > free-website-scripts/ajax-pr-checker.php

 SEO Tools - Google PageRank Checker - Remote Script
twospots > free

 Ajax Code Examples | Free Ajax Scripts | Ajax Downloads - PR Checker
freeajaxscripts > wrapper

 Fake Pagerank Checker PHP Script :: Self SEO Store
selfseo > store/_catalog/php_scripts/_fake_

 Download Page Rank Check Script - Page Rank Check Script allows you to check a website's Google Page Rank and Alexa rating. - Softpedia
webscripts.softpedia > script/Search-Engines/Page-Rank-Check-Script-43058

 Free Google Pagerank Checker Script
ipagerank > download.php

 PHP PR Check Script | Threadwatch.org
threadwatch > node/178



ficgs
More websites

You must register to see these links, as this is a collaborative page, then you may change the order of the links by clicking the icons before the titles.


 » Free Pagerank check script
findmysoft > scripts

 Ajax PageRank Checker Script | Ajax Scripts & Applications | Hot Scripts
hotscripts > listing/ajax

 HM2K.com » Google RageRank Script
hm2k > projects

 Advanced Page Rank Check Script - Webmaster Forum
v7n > forums/content/110281-advanced-page-rank-check-script

 Ajax PageRank Checker Script
script.wareseeker > Ajax/ajax

 Google PageRank Checker Script,Check Google Pagerank Of Any URL
seofreetools > seo-tools/google

 Google/Alexa Page Rank Checking Script by MyDLstore - This script allows you to check a website's Google Page Rank, ...
vclcomponents > PHP/Web_Fetching_Scripts/Google_Alexa_Page_Rank_Checking_Script-

 Multi PageRank Checker Script - Talk Mania Forum
talk-mania > sale-domain-names-web-hosting-websites-services-offers-only/43020-m

 Pagerank checker script nulled - Rapidshare Search
rapidlibrary > index.php

 Google Pagerank Check script ASP Script
webscriptsdirectory > ASP/Others/Google

 Pagerank checker - php script 4-dec-2008 zip Torrent Downloads Bittorrent download source!
torrentdownloads > torrent/315552

 Google/Alexa Page Rank Checking Script : PHP Scripts and Programs Web Fetching Scripts Directory
advancescripts > detailed/12160

 Free page rank check download - page rank check script - Top 4 Download
scripts.top4download > free-page-rank-check

 Ajax Page Rank Checker Script for sale - DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars
dnforum > f60/ajax-page-rank-checker-script-sale-thread-154761



admin
Other websites

The following links might be less relevant, please change their ranks if you find them useful.


 Google PageRank Checker Script for your website
easterndesigner > forum/viewtopic.php?t=1009

 Ajax PageRank (PR) Checker Script - AJAX Script JAVASCRIPT Ajax ::: Navioo.com
navioo > javascript/Ajax_

 Free Google Page Rank (PR) Checker Ajax Script
ajaxupdates > free-google-page-rank-pr-checker-ajax-script

 NSSC Software, a must for all webmasters
nsscsoftware > index.php?main_page=product_info&cPath=4&products_id=11

 Google PageRank Plugin and Addon - Page Rank Checker
webtoolhub > pub/addon

 Finally, Mass PageRank Checker tool! | Alex Polski Blog
alexpolski > 2008/04/18/finally-mass



Response  
  Smilies

Guest name   (optional)       Register for more options.



Trackbacks : If you talked about this article in your blog or website, you may instantly get a backlink 
  There's no trackback at the moment.











 

FICGS message




SEO forums and chat - Search engines optimization



 
Please download Flash player.
July 29, 2010

 

Buttons: Facebook, Twitter, MySpace, Google, Technorati, Yahoo buzz... Ficgs Facebook Myspace Twitter Google Technorati Stumble upon Delicious Digg Yahoo buzz Wikio Furl Reddit Linkedin Squidoo Newsvine Yahoo My Web Blogmarks Comments Blinklist Email

Most active users are promoted here, knowledge is nothing if not shared!

1. thibault : 3437 points, see the blog
2. girl.of.the.day : 919 points, see the blog
3. sympa : 899 points, see the blog
4. lol : 836 points, see the blog
5. longert : 700 points, see the blog

Points take account of the quality of the posts, instantly and after moderation!


Pagerank       Copy this code to display your site's Pagerank




Write upside down to your contacts!   In your blog, anywhere...
(works with Facebook, Twitter, MSN, Yahoo, MySpace, Hi5, Bebo, Youtube...)







FICGS is also a Free Internet Correspondence Games Server.

Here you can play Chess, Go & Poker Texas Holdem online for free in rated class tournaments and a unique world championship.

Free Internet Chess & Go Server


Feel free to link to FICGS :