web directoryearn money in seconds   Free file hosting, free video sharing

<<< The Web Hosting >>>


Go Back   Noeman GSM > Webhosting & Website development > Website development > Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-13-2007, 05:09 PM
Spiral's Avatar
CO-Admin
 
Join Date: Sep 2004
Location: Martil
Age: 25
Posts: 15,629
Reputation: 18564
Spiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super MemberSpiral Mega Super Member
Default PR checker script

By Craig

Here is the script which other site using to check PR. You can tweak this script to make it more powerful than what you expect.

If you want to check PR for each data center you only need to replace this url [Only Registered users can see links . Click Here To Register...] with the data center you want to check.


PHP Code:
<?php
define
(’GOOGLE_MAGIC’0xE6359A60);

function 
zeroFill($a$b)
{
$z hexdec(80000000);
if (
$z $a)
{
$a = ($a>>1);
$a &= (~$z);
$a |= 0×40000000;
$a = ($a>>($b-1));
}
else
{
$a = ($a>>$b);
}
return 
$a;
}

function 
mix($a,$b,$c) {
$a -= $b$a -= $c$a ^= (zeroFill($c,13));
$b -= $c$b -= $a$b ^= ($a<<8);
$c -= $a$c -= $b$c ^= (zeroFill($b,13));
$a -= $b$a -= $c$a ^= (zeroFill($c,12));
$b -= $c$b -= $a$b ^= ($a<<16);
$c -= $a$c -= $b$c ^= (zeroFill($b,5));
$a -= $b$a -= $c$a ^= (zeroFill($c,3));
$b -= $c$b -= $a$b ^= ($a<<10);
$c -= $a$c -= $b$c ^= (zeroFill($b,15));

return array(
$a,$b,$c);
}

function 
GoogleCH($url$length=null$init=GOOGLE_MAGIC) {
if(
is_null($length)) {
$length sizeof($url);
}
$a $b 0×9E3779B9;
$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 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 
$c+=($url[$k+8]<<8);
case 
$b+=($url[$k+7]<<24);
case 
$b+=($url[$k+6]<<16);
case 
$b+=($url[$k+5]<<8);
case 
$b+=($url[$k+4]);
case 
$a+=($url[$k+3]<<24);
case 
$a+=($url[$k+2]<<16);
case 
$a+=($url[$k+1]<<8);
case 
$a+=($url[$k+0]);
}
$mix 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 
getrank($url)
{
$url ‘info:.$url;
$ch GoogleCH(strord($url));

$file "http://www.google.com/search?client=navclient-auto&ch=6$ch&features=Rank&q=$url";
$data file($file);
$rankarray explode (:, $data[2]);
$rank $rankarray[2];
return 
$rank;
}
if (isset(
$_GET[’url’]) && !empty($_GET[’url’]))
{
$url $_GET[’url’];
$pr getrank($url);
$pr_html 
<div align="left">
<
b>Page rank: </b.$pr.
</div>
;
}
else
$pr_html ;

?>
<html>
<title>Google Page Rank Checker</title>
<body>
<form method="get">
<table border="0">
<tr>
<td>
Site URL: (example: www.google.com)
</td>
<td>
<input name="url" type="text" value="<?=$_GET[’url’];?>">
</td>
<td>
<input type="submit" value="Get PR">
</td>
</tr>
</table>
</form>
<?=$pr_html;?>
</body>
</html>
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:15 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 2004-2008 Noeman . All rights reserved
Remortgages | Mortgages | Online Advertising | Loans | Problem Mortgage

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111