Are there any around that are any good at all? Post links/demos if you have. Would prefer one already skinned, nothing fancy at all Edit-I'll pay for one if need be
Oh I get you, you want a script to allow users to check pagerank of other websites yeh? I'll have a look now see what I find, 2 heads are better than 1! Scott.
http://www.hm2k.com/projects/pagerank Doesn't work on my server though, it uses fsockopen(). Worth a try though! Good luck. Scott.
At least you got a page! Lol! Try CHMODing? Don't know, here's what I got... http://www.myspace4yourpage.com/test/pagerank.php I was reading some of the posts, works for some, doesn't for others.
http://www.myspace4yourpage.com/test/index.php As I said before, works for some.. Doesn't for others... Depends on your server config. That looks like a good script if it will work on your server. I found it here: http://www.hotscripts.com/Detailed/70274.html
That one would be perfect. Going to give it a shot, brb edit-I believe that's the one that came with the domain I just bought. It was showing but threw an error when you hit submit actually, hit submit on the link you gave me, it throws the same errors
Works for me, I had to uncomment out some lines that were commented... works great. I will use this. Thanks for the link.
Here are the demo's that I have for you (3 Scripts for $5.00), they are ajax driven. http://zetoxy.com/pagerank/ http://zetoxy.com/pagerank2/ http://zetoxy.com/pagerank3/ Just send me a pm we have a deal
Hmmm... if all else fails take a look at: http://www.myspace4yourpage.com/test/new/pagerank-script.php It's really starting to bug me now! We're making prgress though! All the information except the actual pagerank is correct... Going to see if I can see what it is... I'm sure someone said a while back that google banned/changed the way it shows pagerank. Scott.
The results are not correct. It says Google has a PR of 10, when in the Google toolbar, it has a PR of 8. Scott.
Simple way to test it is using the google toolbar, has a built in PR checker. It says www.google.com is PR8. Red_Virus's checkers say PR10. Defeats the object if the results are incorrect.
so there isn't any accurate ones? Just the toolbar is accurrate? I still like the third one Red posted. I have a feeling it's a free script though
are there any combined scripts like this? Say pagerank, and one or more other tools ? edit-I'm not sure I'd like that though
Try this: <?php class pagerank { var $url; function pagerank ($url) { set_time_limit(0); $this->url = parse_url('http://' . ereg_replace('^http://', '', $url)); $this->url['full'] = 'http://' . ereg_replace('^http://', '', $url); } function getPage ($url) { if (function_exists('curl_init')) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com/search?hl=en&q=google&btnG=Google+Search'); return curl_exec($ch); } else { return file_get_contents($url); } } function getPagerank () { $url = 'info:' . $this->url['host']; $checksum = $this->checksum($this->strord($url)); $url = "http://www.google.com/search?client=navclient-auto&ch=6$checksum&features=Rank&q=$url"; $data = $this->getPage($url); preg_match('#Rank_[0-9]:[0-9]:([0-9]+){1,}#si', $data, $p); $value = ($p[1]) ? $p[1] : 0; return $value; } function getAlexaRank () { $url = $this->url['host']; $url = "http://data.alexa.com/data?cli=10&dat=s&url=$url"; $data = $this->getPage($url); preg_match('#<POPULARITY URL="(.*?)" TEXT="([0-9]+){1,}"/>#si', $data, $p); $value = ($p[2]) ? number_format($this->toInt($p[2])) : 0; return $value; } function getDmoz () { $url = ereg_replace('^www\.', '', $this->url['host']); $url = "http://search.dmoz.org/cgi-bin/search?search=$url"; $data = $this->getPage($url); if (ereg('<center>No <b><a href="http://dmoz\.org/">Open Directory Project</a></b> results found</center>', $data)) { $value = false; } else { $value = true; } return $value; } function getYahooDirectory () { $url = ereg_replace('^www\.', '', $this->url['host']); $url = "http://search.yahoo.com/search/dir?p=$url"; $data = $this->getPage($url); if (ereg('No Directory Search results were found\.', $data)) { $value = false; } else { $value = true; } return $value; } function getBacklinksGoogle () { $url = $this->url['host']; $url = 'http://www.google.com/search?q=link%3A' . urlencode($url); $data = $this->getPage($url); preg_match('#of about <b>([0-9,]+){1,}#si', $data, $p); $value = ($p[1]) ? number_format($this->toInt($p[1])) : 0; return $value; } function getBacklinksYahoo () { $url = $this->url['host']; $url = 'http://siteexplorer.search.yahoo.com/search?p=' . urlencode("http://$url") . '&bwm=i'; $data = $this->getPage($url); preg_match('#Inlinks \(([0-9,]+){1,}\)#si', $data, $p); $value = ($p[1]) ? number_format($this->toInt($p[1])) : 0; return $value; } function getBacklinksMSN () { $url = $this->url['host']; $url = 'http://search.live.com/results.aspx?q=link%3A' . urlencode($url); $data = $this->getPage($url); preg_match('#1 of ([0-9,]+){1,}#si', $data, $p); $value = ($p[1]) ? number_format($this->toInt($p[1])) : 0; return $value; } function getResultsAltaVista () { $url = $this->url['host']; $url = 'http://www.altavista.com/web/results?q=' . urlencode($url); $data = $this->getPage($url); preg_match('#AltaVista found ([0-9,]+){1,} results#si', $data, $p); $value = ($p[1]) ? number_format($this->toInt($p[1])) : 0; return $value; } function getResultsAllTheWeb () { $url = $this->url['host']; $url = 'http://www.alltheweb.com/search?q=' . urlencode($url); $data = $this->getPage($url); preg_match('#<span class="ofSoMany">([0-9,]+){1,}</span>#si', $data, $p); $value = ($p[1]) ? number_format($this->toInt($p[1])) : 0; return $value; } function getAge () { $url = ereg_replace('^www\.', '', $this->url['host']); $url = "http://reports.internic.net/cgi/whois?whois_nic=$url&type=domain"; $data = $this->getPage($url); preg_match('#Creation Date: ([a-z0-9-]+)#si', $data, $p); if ($p[1]) { $time = time() - strtotime($p[1]); $years = round($time / 31556926); $days = round(($time % 31556926) / 86400); $value = "$years years, $days days"; } else { $value = 'Unknown'; } return $value; } function toInt ($string) { return preg_replace('#[^0-9]#si', '', $string); } 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; } } $options = array( 'pagerank' => true, 'dmoz' => true, 'yahooDirectory' => true, 'backlinksYahoo' => true, 'age' => true ); if ($_POST['urls']) { $rep=array("\r"," "); $_POST['urls']=str_replace($rep,'',$_POST['urls']); $urls = split("\n", $_POST['urls']); $results = array(); foreach ($urls as $url) { if(!empty($url)||trim($url!='')){ $data = new pagerank(trim($url)); $results[] = array( 'url' => $data->url['host'], 'pagerank'=>"http://www.finqoo.com/display_rank?site=".$url, 'dmoz' => $data->getDmoz(), 'yahooDirectory' => $data->getYahooDirectory(), 'backlinksYahoo' => $data->getBacklinksYahoo(), 'age' => $data->getAge() ); } } } ?> PHP: <?php error_reporting(0); // comment this out if you experience problems include('data.class.php'); ?> <!-- place the following code where you want the form and results to show: --> <style type='text/css'> .style1 {/* title above the input area */ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } .style2 {/* column heading TEXT */ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } .style3 { /* font size for the result data */ font-size: 10px } .style4{ /* background of individual heading cells */ background-color:#FFF; } .style5 { /* font family (face) for the result data */ font-family: Verdana, Arial, Helvetica, sans-serif } .head td { /* background of the heading row */ font-weight: bold; color: #FFFFFF; background-color: #008000; padding: 4px; } .result td { /* background color of the results rows */ background-color: #F5F5F5; padding: 4px; } #urls{ /* margin around textarea input box */ margin:0; } .cpyrgt{ /* "powered by..." div block */ margin:2px 0; font-size:10px; width:320px; text-align:right; color:#CCC; } .cpyrgt.a{ /* "powered by..." link text color*/ color:#CCC; } .cpyrgt.a:hover{ /* "powered by..." mouseover link text color*/ color:blue; } </style> <center> <table align="left" width="100%" border="0"> <tr> <td> <div align="center"> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <br /> <input id='urls' name="urls" cols='45' rows="8"></textarea> <span><input type="submit" value="Submit" /></span><br /> </form> <div> <?php if ($results) { ?> <table width="80%"> <tr class="head"> <td class='style4'><span class="style2">Domain</span></td> <td class='style4'><span class="style2">PageRank</span></td> <td class='style4'><span class="style2">DMOZ</span></td> <td class='style4'><span class="style2">Yahoo! Directory</span></td> <td class='style4'><span class="style2">Yahoo! Backlinks</span></td> <td class='style4'><span class="style2">Age</span></td> </tr> <?php foreach ($results as $result) { ?> <tr class="result"> <td><a href="http://<?php echo $result['url']; ?>" class="style5 style3"><?php echo $result['url']; ?></a></td> <td align='center'><span class="style2 style3"><?php echo "<img src='".$result['pagerank']."'>"; ?></span></td> <td><span class="style2 style3"><?php echo ($result['dmoz']) ? 'Yes' : 'No'; ?></span></td> <td><span class="style2 style3"><?php echo ($result['yahooDirectory']) ? 'Yes' : 'No'; ?></span></td> <td><span class="style2 style3"><?php echo $result['backlinksYahoo']; ?></span></td> <td><span class="style2 style3"><?php echo $result['age']; ?></span></td> </tr> <?php } ?> </table> <?php } ?></td> </tr> </table> </center> PHP: If anybody mods it reply back Scott.