Gavin Shaw
Sep 26 2006, 03:10 AM
Toolbar V 4.0.x Pagerank checksum caculator CODE #!/usr/bin/php <?php
/* Google PageRank Checksum Algorithm (Toolbar 3.x/4.x) http://www.gamesaga.net/pagerank/ http://www.upsdn.net/ */
error_reporting(E_ALL);
function StrToNum($Str, $Check, $Magic) { $Int32Unit = 4294967296; // 2^32
$length = strlen($Str); for ($i = 0; $i < $length; $i++) { $Check *= $Magic; //If the float is beyond the boundaries of integer (usually +/- 2.15e+9 = 2^31), // the result of converting to integer is undefined // refer to http://www.php.net/manual/en/language.types.integer.php if (is_float($Check)) { $Check = ($Check - $Int32Unit * (int) ($Check / $Int32Unit)); // - 2^31 $Check = ($Check < -2147483647) ? ($Check + $Int32Unit) : $Check; } $Check += ord($Str{$i}); } return $Check; }
function HashURL($String) { $Check1 = StrToNum($String, 0x1505, 0x21); $Check2 = StrToNum($String, 0, 0x1003F); $Check1 >>= 2; $Check1 = (($Check1 >> 4) & 0x3FFFFC0 ) | ($Check1 & 0x3F); $Check1 = (($Check1 >> 4) & 0x3FFC00 ) | ($Check1 & 0x3FF); $Check1 = (($Check1 >> 4) & 0x3C000 ) | ($Check1 & 0x3FFF); $T1 = (((($Check1 & 0x3C0) << 4) | ($Check1 & 0x3C)) <<2 ) | ($Check2 & 0xF0F ); $T2 = (((($Check1 & 0xFFFFC000) << 4) | ($Check1 & 0x3C00)) << 0xA) | ($Check2 & 0xF0F0000 ); return ($T1 | $T2); }
function CheckHash($Hashnum) { $CheckByte = 0; $Flag = 0;
$HashStr = sprintf('%u', $Hashnum); $length = strlen($HashStr); for ($i = $length - 1; $i >= 0; $i --) { $Re = $HashStr{$i}; if (1 == ($Flag % 2)) { $Re += $Re; $Re = (int)($Re / 10) + ($Re % 10); } $CheckByte += $Re; $Flag ++; }
$CheckByte %= 10; if (0 !== $CheckByte) { $CheckByte = 10 - $CheckByte; if (1 === ($Flag%2) ) { if (1 === ($CheckByte % 2)) { $CheckByte += 9; } $CheckByte >>= 1; } }
return '7'.$CheckByte.$HashStr; }
if ($argc == 2) { echo CheckHash(HashURL($argv[1])); } else { exit ("please specify a URL,for example: http://www.upsdn.net/\n"); }
?>
I have tested on Debian GNU/Linux etch QUOTE
PHP 5.1.6-1 (cli) (built: Sep 1 2006 13:52:26)
Linux sagas 2.6.16-2-686 #1 Fri Aug 18 19:01:49 UTC 2006 i686 GNU/Linux
Reply
Niru
Sep 26 2006, 09:16 AM
hey, how can I run this script? Is it for any webpages or some other stuff?? ( Sorry to ask you such a newbie question! I'm not that much into scripting and all!  )
Reply
Quatrux
Sep 26 2006, 12:53 PM
I just looked over the script and I think you could give a description some kind of what page rank it shows? I think it won't work, from where do you get the variable $argc? and where it should check the page rank? by the letters and numbers in the domain? I think it might be just one part of the script? I don't really understand  Or it should be used somewhere I don't know? For example if a user will find this post from google search, he won't understand? Or this is just me who does not understand..
Reply
CaptainRon
Sep 26 2006, 03:08 PM
Hey why isn't even a definition of the Code snippet provided? I can't figure out what this code would do... Can you please elaborate would it accomplishes?
Reply
Gavin Shaw
Oct 2 2006, 01:46 AM
QUOTE(Niran @ Sep 26 2006, 09:16 AM)  hey, how can I run this script? Is it for any webpages or some other stuff?? ( Sorry to ask you such a newbie question! I'm not that much into scripting and all!  ) This is a Command Line Script. if you save it as pagerank.php, you can open a shell, then run the command CODE $php pagerank.php
2005-09-13 v0.1 first release 2005-10-21 v1.1 fix a bug for the final character 2006-09-21 v1.2 compatible with PHP 4.4/PHP 5.x 2006-09-29 v1.3 X86_64 CPU supported
Reply
Gavin Shaw
Oct 2 2006, 02:26 AM
QUOTE(Quatrux @ Sep 26 2006, 12:53 PM)  I just looked over the script and I think you could give a description some kind of what page rank it shows? I think it won't work, from where do you get the variable $argc? and where it should check the page rank? by the letters and numbers in the domain? I think it might be just one part of the script? I don't really understand  Or it should be used somewhere I don't know? For example if a user will find this post from google search, he won't understand? Or this is just me who does not understand.. Thank your reply. The code above is a complete CLI script,which get $argc and $argv from the shell command line please refer to http://www.php.net/manual/en/intro-whatcando.phpServer-side scripting demo http://pagerank.gamesaga.net/Server-side scripting source code http://pagerank.gamesaga.net/pagerank.php.zip
Reply
Gavin Shaw
Oct 2 2006, 02:49 AM
QUOTE(CaptainRon @ Sep 26 2006, 03:08 PM)  Hey why isn't even a definition of the Code snippet provided?
I can't figure out what this code would do...
Can you please elaborate would it accomplishes?
It's a complete scripting. I have added comments to the source code Server-side scripting source code http://pagerank.gamesaga.net/pagerank.zipCODE /* * convert a string to a 32-bit integer * the string maybe is your webpage's url */ function StrToNum($Str, $Check, $Magic)
/* * Genearate a hash string from a url */ function HashURL($String)
/* * genearate a checksum for the hash string */ function CheckHash($Hashnum)
$C = "<a href=\"http://www.google.com/search?client=navclient-auto&features=Rank:&q=info:"; $E = "\">Get PageRank</a>";
if (isset ($_GET['url'])) { echo $C.$_GET['url'].'&ch='.CheckHash(HashURL($_GET['url'])).$E; }
If the scripting get a url parameter from your browser, it will generate a checksum for the url
Reply
Gavin Shaw
Oct 6 2006, 05:52 PM
Hi, Pagerank checksum algorithm for Python is available too http://pagerank.gamesaga.net/
Reply
Recent Queries:--
"video convert tool v3.x - 3.82 hr back. (1)
-
i have been trying to download google toolbar for 2 hours how long does it take ? - 8.71 hr back. (1)
-
video converter v3.x - 18.19 hr back. (1)
-
video convert tool v3.x para download - 39.41 hr back. (1)
-
how to remove google toolbar 3.x - 48.23 hr back. (1)
-
convert tool v3.x - 62.04 hr back. (1)
-
video converter tool v3.x - 66.37 hr back. (1)
-
download convert tool v3.x - 87.54 hr back. (1)
-
http://pagerank.gamesaga.net/ - 109.67 hr back. (1)
-
video convert tool v3.x” - 115.36 hr back. (1)
-
"video convert tool v3.x" - 116.42 hr back. (1)
-
video convert tool v3.x - 19.23 hr back. (19)
-
"video converter tool v3" - 159.50 hr back. (1)
-
video converter tool v3 x - 163.08 hr back. (1)
Similar Topics
Keywords : google toolbar v3 pagerank checksum algorithm compatible php php- Google Restricts The Search Results
- (10)
I usually hunt for information by searching for the information on various topic of my interest. I
usually use Google and Live for searching and occassionally Yahoo and AskJeeves. The strange thing
I found in Google is that I dosent allow me to view the search result beyond 1000 reaults. I dont
face this in other browsers. I got the following message when I went further beyond the 50th result
page, CODE Sorry, Google does not serve more than 1000 results for any query. (You asked for
results starting from 980.) I knew that google had this restriction on the t...
Google App Engine
- free server for your web app (1)
Google Apps
- (1)
Well I suppose many of you know this feature about google, but for those who don't this will be
very helpful because this feature lets you among other thing, create email accounts with
whateveryouwant @yourdomain.com for free.
What is most important is that you use the
GMail interface to your account, and you can even change some things, like the pictur...
Google Suggest (beta)
- New Google's Search Auto-Complete Feature... (10)
Lately, Google has been producing so many useful tools and utilities, not to mention its amazing
search capabilities. Many of those new tools pass through a long phase of BETA testing to ensure
that they reached their optimum usefulness and are ready to be put to use by the masses. So now,
Google has released a BETA version of one more tool, called Google Suggest!... You know how many
of today's Web browsers have an auto-complete feature, where you type a few letters and that
application tries to recognize the phrase you're typing and complete it for you? W...
Do Google Search Better Than Yahoo?
- This is a question for you all google users!! (15)
Do you think google search is better than yahoo?? Are they have similar search?? Well for me google
search is more effective than yahoo search engine....
Do You Like Google?
- Do you like google? (32)
I want to see how many people like google! people say google is the best people say yahoo is the
bomb people like to say google "blah blah" not yahoo "blah blah" i like yahoo better! vmkrightpoint...
Rate Google On A Scale Of 1-10
- Rate google (59)
Rate google! 1-10 1=omfg it sucks 10=OMFG best ever! then explain why My vote would be 9! I love
google in every way! Soo many sites no popups! Right on for what you need! Never fails me! Infact
got to here from google! Topic title edited to reflect nature of content better. Please make
your topic titles as descriptive as possible. ...
Google- Changing The Search Preferences!
- (3)
If you want the google site to block more sites, then you will need to go onto the google site. Then
go onto preferences. There you can change alot .For example the language it should search for only,
or if the result window should be seperate, or how many results should be displayed per site. This
window to change preferences is very useful! Have fun!...
Tips To Earn In Google Adsense
- (7)
This is not mine but i will just share this. -------------------------------------------------- Earn
easy with google adsense works 100%.Try these it will work and u will get 4$ to 8$ to these word
search. * Add google search box in your site *Then goto google search box type forex *Then click
search button then it will prompt you 4 or 3 ads by google at the TOPLEFT of your screen. *Right
click and open those there or four ads. *wait for 1 hours then login to your adsense account will
find 4$ to 8$ amount. Note while you search and click use proxy or use different ...
Is The Sandbox Only For Google?
- Does the sand box affect yahoo, msn? (0)
Does the sandbox effect prevent yahoo and msn search engine rankings as well as google rankings?
Because my site was on the first page for it's targeted keyword on msn and yahoo. But now my
site url can't even be found in yahoo. It says that such an url does not exist! Do any of you
know the answer to this? If so share your views....
How To View Live Traffic Cameras Using Google
- (3)
>Go to http://www.google.com >In the search field, type "inurl:view/index.shtml" (without the
quotes) >In the results, you can click any one of them to view a live traffic camera. This
is very fun if you are REALLY bored. Have fun! /smile.gif" style="vertical-align:middle"
emoid=":)" border="0" alt="smile.gif" />...
Geocamming On "google" .....look At What They Are Watching........
- (2)
http://www.hackaday.com/2005/01/14/geocamm...eras-revisited/ don't let the link name scare
you..........hackaday is a great site.......... and one of the coolest things ever is GEOCAMMING on
"Google"......this link will teach you how to surf the unsecured web cams of the world.......nothing
to it really and it is a great time killer.......... you'll see department stores, colleges,
airports, beaches, bars, pools, docks, lions, tigers and bears........factories.....you name it it
is there, and some cams you can control...... coolset thing I saw was a wedding...
Google Servers
- Do you ever wonder about what kind of servers google uses and why they (2)
Do you ever wonder about what kind of servers google uses? Or why even though with all those
searches per second (over 1000 times every second) they dont lagg? I was thinking about it and
Google must have some monster servers like astahost does. After some research i found this:
Google's server infrastructure is divided in several types, each for a different purpose. Google
DNS Servers answer the DNS requests and serve as intelligent, worldwide load-balancers. They guess
the data center nearest to the user to speed up all HTTP requests. Google Web Servers coordinate...
My First Google Error
- (8)
Today in computing at school! We were using google. We typed in ''Poll scripts''
It came up with a pop up saying ''Sorry Google does not currently allow this
search'' I then clicked refresh & it worked! Have errors happened to you ...
Does Google Provide This Tool?
- (9)
I am interested to know if there is a tool does this I can pretend a user from NY and search a
keyword in Google and i want to see the search results Then i want to search the exact the same
phrase and pretend to be a user from Canada, i want see if the search results are different PS: I
just want to test my keyword ranking for SEO purposes. Any ideas?...
How Long Does It Take To Be Listed On Google?
- (15)
How long does it take to be listed on google? I have uploaded a sitemap. The site still hasnt been
listed on google. /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />...
Google - How To Hit The Top
- SOE technics, suggestions, links (13)
Hi guys, I spent some time browsing web and searchnig for quick way how to speed up
my way to the top. There are my 3 suggestions: 1) Find the right key words find
the phrase1 Try google suggestions 2) create a clean 1-4 page web site. Register domain
with the keyword you found (asset-management-free.com). Make sure there are no HTML errors on
your pages. Use some idiot-proof tool like topstyle If you like firefox there is the best tidy
HTML extension. You can check your HTML. Tidy HTML - free 3) find as many web...
Google
- Google criteria (3)
Google is certainly the best in the buisness -no manipulation-But I want to share some contrarory
concept.With all due respect to google,I don't know why google is giving such a low grading to
one of the finnest web designing company in the world quality wise for sure,I really miss a huge in
my personal flash website if I doesn't opt for MSN in time. You shall visit
www.webdesigningcompany.net and see the designing bonanza. .Ofcourse there are lot many better but
only point is that I never try them. ...
The Bad Side Of .....google
- things you never heard (50)
i have just came accross this website, and it shows all the truths and theories about google. im
shocked that google have never deleted anything at all "since day one".! this can mean when you
delete anything on the gmail server it aint actually deleted. it is still saved on the google
server. it also states that google actually atmitted to the savings of all documents! also theres
cookies in your browser, so if you make a search on their search engine it tracks down what you
search for and saves it! is the saying and reality tv shows coming true... big brother? then ...
Fun Answers Google Will Give You
- (10)
What happens if you type the text below into Google's search box? answer to life, the universe
and everything Note this is the same calculator that knows how to do basic arithmetic and knows
how to convert pounds to kilograms, feet to meters, miles to kilometers, Fahrenheit to Celsius, etc.
For more Google fun, check out this video: http://www.collegehumor.com/video:1766563 ...
Google Analytics Tracking Code Position
- (10)
Are there any different tracking results when placing google analytics tracking code at the
beginning (after ) or at the end (before ) ? I post this question because I think a heavy site
will load slower so it can be failed to load all site's contents and GA tracking code at the end
of the site will not be loaded and it will affect the counter. Any experience about this ?...
Google Webspace
- Google Web Space (21)
I have heard rumors that Google might be offering webspace to customers. I haven't read any
articles about this. I merely stumbled upon it while reading something. If this rumor is true, what
do you think Google will offer if their webspace just happened to be free? I personally think they
will eventually expand into this industry. Google has made it's way into Froogle and Gmail.
It's likely that they will end up giving out free webspace. Yes, I know, they do offer blogs
already!!...
Google Wants You To Share Stuff
- (4)
Google has entered the social bookmarking market with a new product called Shared Stuff. Shared
Stuff is simple enough; users drag an "email / share" button into their browser, and click it when
they want to add pages to their Shared Stuff profile. Links can include an image, text extract, and
/ or a user comment. The results can then be viewed directly, via iGoogle or RSS.
http://www.google.com/s2/sharing/stuff
http://www.techcrunch.com/2007/09/20/googl...to-share-stuff/ ...
SiteAdvisor: Search Engines Take Users To Spyware Sites
- Google , Yahoo, MSN Search (11)
According SiteAdvisor research, 5% of searched queries result in a search engine may cause damages
to useres and users computers. A report about "Online Search Security" says that none of these Web
portals show 100% secure results. The Accurently results was from MSN that only showed 3.9% of
malicious websites, followed by Yahoo with 4.3% and the world largest search engine , Google , in
third along with AOL with 5.3%. Portals like Google, MSN and Yahoo redirect useres to spyware sites
witch sent Spam and invade the computers, all this according to SiteAvisor. ...
The Hacker's Google
- A template for the SE - can you read it? (29)
I bet many of you have seen the 1337 language? Well, I also bet most of you guys (or gals)
haven't seen this! A new addition I found while ago... Google - H4x0r Don't read ahead
if you want to try reading what it says in there!! . . . n0rM4L s34rCh = normal search 1|\/|4935
= images 6r00pZ = groops (groups) - this is a little tricky because the '6' is a capital
'G' and the two 'O's make a long 'O' sound d1r3c70rY = directory 4|| 480u7
Google = all about Google 4DV4NC3D 534RC|-| = advanced search PR3F3R3N(3Z = preference...
Submit
- Submit my site to google (3)
how i can submit my site to google ? /biggrin.gif" style="vertical-align:middle" emoid=":D"
border="0" alt="biggrin.gif" />...
Google Launches Us Wireless Crusade
- (0)
Google is flirting with yet another effort to offer unfettered internet access over American
airwaves, and as usual, it's facing endless back-and-forth with the FCC.
http://www.theregister.co.uk/2007/09/05/fc...comment_google/ ...
Google Problem
- (5)
hi today i got a problem while try to use google when i open google, a sorry appears as follows:
QUOTE We're sorry... ... but your query looks similar to automated requests from a computer
virus or spyware application. To protect our users, we can't process your request right now.
We'll restore your access as quickly as possible, so try again soon. In the meantime, if you
suspect that your computer or network has been infected, you might want to run a virus checker or
spyware remover to make sure that your systems are free of viruses and other spurious ...
Google Webpages!
- (16)
Hey guys google just made a place that you can make your own website for free but really dont take
much html and stuff and only 100MB of space. If you want check it out at www.pages.google.com >> you
need to loging ( you need to make an account if you dont have one alread )...
Removing Information From Google Search Engine
- (8)
I just searched my name and I found a couple of sites I had made some years back and I want to know
if there is a way of how to remove this information from Google search engine. All of them were
submitted automatically from blogging sites I use...like for example: Friendster, MyPetsPages...etc.
...
Looking for google, toolbar, v3, x, 4, x, pagerank, checksum, algorithm, compatible, php, 4, 4, x, php, 5, x
|
*SIMILAR VIDEOS*
Searching Video's for google, toolbar, v3, x, 4, x, pagerank, checksum, algorithm, compatible, php, 4, 4, x, php, 5, x
|
advertisement
|
|