Does anyone know how to write a Mathematica function that returns the Google PageRank of a given URL?
I found a tutorial for achieving this in a bash script here, but I have no idea how to port this over to Mathematica.
I am not sure what exactly that rank mean. But here's direct rough porting of code:
Seeing as how someone has been nice enough to write the C-code for you, you could just use that. Assuming you have a C compiler on your machine, here's how you use it within Mathematica. Note that
I guess that the point of this thing is that it can be used in conjunction with Google's API to get very rough info on a sites rank. We can use it like so.
This could be to generate an image like so:
Incidentally, another very nice tool for obtaining page rank information is via WolframAlpha:
If you're on Windows platform and you're using MSVS compiler, there is no C99 support. That is why above code will fail to compile, because of the lack of stdbool.h
A workaround for this is:
Now you need to specify the _Win32 preprocessor definition, in order to exclude the stdbool.h block: