You can't achieve that using AJAX and PHP because using AJAX you can't connect to another domains, so it's possible only for combination of IFRAME onload event and PHP like joesgraphics said.
partly its wrong.. PHP can do the page rank retrieval and using ajax, you can display the response from the PHP file which is in your own domain.. digpagerank.com is using the same way..
Did you try your script in Firefox? I am very curious how can you send ajax request from one domain to another in firefox . Of course in the same domain you can do that using AJAX but i assume that we are talking about ajax request from foreign domains if not, JS isn't needed and just PHP can do that job.
When i said ajax and php i dont get what u meen by from another domain i said "PHP" so unless u have a script on another for this why would we want to cross domains you use the ajax to send the request to the php script using ajax then get the query back using ajax from the php script on ur domain. If your still looking for a script like this PM me and ill make you it. Joe
Found out today that there is a way around cross domains with ajax using a proxy script on ur site dident hav time to read it all.