![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
A page rank button for a remote site...is it possible?
I am making a web page with a list of sites on it, and I wanna display a pagerank button to show the PR of each site, but all the buttons I found are so you can display the PR of the local site, not remote sites, like this
![]() is there any way to show the pagerank of other sites in a button like that? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
So Fucking Banned
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
|
There is - I have done it - but I will have to dig around my bookmarks....
I could be some time ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Dialer Kingpin
Join Date: Jun 2003
Location: New York
Posts: 10,816
|
Not sure if there's any public open-script ones.
But i'm sure you can get a coder to hack it up real quick for you. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
PostMaster General
Join Date: Aug 2006
Posts: 10,781
|
jace, check out axslinks (axscripts.com), they have found a way to poll PR of URLs through their client side script.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Nov 2001
Location: Redmond, WA
Posts: 2,727
|
I offer this service on xxxwebmasters.com
Go grab one |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
You need to consider that your page loads are going to be painfully slow if you have the script request the PR for every site in your list... What you really want is a script that runs maybe once a day on your server and it grabs the pr of all the sites.. that script could generate a little graphic for you or something which you would then include on the page.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
PostMaster General
Join Date: Aug 2006
Posts: 10,781
|
Quote:
i am running through the source now to find the line of code you need ![]()
__________________
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
A php function for ya:
Code:
header("Content-Type: text/plain; charset=utf-8"); define('GOOGLE_MAGIC', 0xE6359A60); //unsigned shift right function zeroFill($a, $b) { $z = hexdec(80000000); //echo $z; 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; $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 = 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 = mix($a,$b,$c); $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; $k += 12; $len -= 12; } $c += $length; switch($len) /* all the case statements fall through */ { case 11: $c+=($url[$k+10]<<24); case 10: $c+=($url[$k+9]<<16); case 9 : $c+=($url[$k+8]<<8); /* the first byte of c is reserved for the length */ 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]); /* case 0: nothing left to add */ } $mix = mix($a,$b,$c); //echo $mix[0]; /*-------------------------------------------- report the result */ return $mix[2]; } //converts a string into an array of integers containing the numeric value of the char function strord($string) { for($i=0;$i<strlen($string);$i++) { $result[$i] = ord($string{$i}); } return $result; } // http://www.example.com/ - Checksum: 6540747202 $url = $_GET['url']; //print("url:\t{$_GET['url']}\n"); $ch = "6" . GoogleCH(strord("info:" . $url)); $fp = fsockopen("www.google.com", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET /search?client=navclient-auto&ch=". $ch . "&features=Rank&q=info:" . $url . " HTTP/1.1\r\n"; $out .= "Host: www.google.com\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); //$pagerank = substr(fgets($fp, 128), 4); //echo $pagerank; while (!feof($fp)) { $data = fgets($fp, 128); $pos = strpos($data, "Rank_"); if($pos === false){} else{ $pagerank = substr($data, $pos + 9); echo $pagerank; } } fclose($fp); }
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
squishypimp
This message is hidden because squishypimp is on your ignore list. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
PostMaster General
Join Date: Aug 2006
Posts: 10,781
|
Code:
<?php /* Written and contributed by Alex Stapleton, Andy Doctorow, Tarakan, Bill Zeller, Vijay "Cyberax" Bhatter traB This code is released into the public domain */ define('GOOGLE_MAGIC', 0xE6359A60); //unsigned shift right function zeroFill($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; $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 = 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 = mix($a,$b,$c); $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; $k += 12; $len -= 12; } $c += $length; switch($len) /* all the case statements fall through */ { case 11: $c+=($url[$k+10]<<24); case 10: $c+=($url[$k+9]<<16); case 9 : $c+=($url[$k+8]<<8); /* the first byte of c is reserved for the length */ 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]); /* case 0: nothing left to add */ } $mix = mix($a,$b,$c); /*-------------------------------------------- report the result */ return $mix[2]; } //converts a string into an array of integers containing the numeric value of the char function strord($string) { for($i=0;$i<strlen($string);$i++) { $result[$i] = ord($string{$i}); } return $result; } // converts an array of 32 bit integers into an array with 8 bit values. Equivalent to (BYTE *)arr32 function c32to8bit($arr32) { for($i=0;$i<count($arr32);$i++) { for ($bitOrder=$i*4;$bitOrder<=$i*4+3;$bitOrder++) { $arr8[$bitOrder]=$arr32[$i]&255; $arr32[$i]=zeroFill($arr32[$i], 8); } } return $arr8; } function GoogleCHNew($ch){ $ch=sprintf("%u", $ch); $ch = ((($ch/7) << 2) | (((int)fmod($ch,13))&7)); $prbuf = array(); $prbuf[0] = $ch; for($i = 1; $i < 20; $i++) { $prbuf[$i] = $prbuf[$i-1]-9; } $ch = GoogleCH(c32to8bit($prbuf), 80); return sprintf("%u", $ch); } function get_page_rank($url){ $url = preg_replace('/\?.*$/','?',$url); $reqgr = "info:".$url; $reqgre = "info:".urlencode($url); $gch = GoogleCH(strord($reqgr)); $gch = "6".GoogleCHNew($gch); $querystring = "http://toolbarqueries.google.com/search?client=navclient-auto&ch=".$gch."&ie=UTF-8&oe=UTF-8&features=Rank:FVN&q=".$reqgre; $patern = '/^http:/'; $patern2 = '/^http:\/\/.*google\..*\/(search|images|groups|news).*/'; $patern3 = '/^http:\/\/localhost.*/'; $patern4 = '/^http:\/\/(127\.|10\.|172\.16|192\.168).*/'; //local ip if(!preg_match($patern, $url) || preg_match($patern2, $url) || preg_match($patern3, $url) || preg_match($patern4, $url)){ return -1; }else{ return $querystring; } } ?>
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
PostMaster General
Join Date: Aug 2006
Posts: 10,781
|
your loss.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
and to add - I use it in a similar way to you and it gets the pagerank for well over 200,000 domains in less than 30 minutes, so I reckon calling it on the fly would be more than fine for a webpage of sites (count ~10ms /site lookup)
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 | |
PostMaster General
Join Date: Aug 2006
Posts: 10,781
|
Quote:
![]()
__________________
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
So Fucking Banned
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
PostMaster General
Join Date: Aug 2006
Posts: 10,781
|
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
So Fucking Banned
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
just rename this picture to your domain name
![]()
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
phplinksdirectory has this already incorporated.
Theres already a library for it in the public domain. Best way would be to create a database with domain/pr and update it once in a while when gpr updates. |
![]() |
![]() ![]() ![]() ![]() ![]() |