getAlexaRank($url) function not working


Posted on 16th Feb 2014 07:03 pm by admin

I have made a function to get alexa rank
the site is here: http://mytestsite.rack111.com/1

but the Alexa rank is showing up blank and I dont know why can someone please tell me if there is something wrong with my code
Did you know?Explore Trending and Topic pages for more stories like this.



Code:
function getAlexaRank ($url) {
$xml = simplexml_load_file("http://data.alexa.com/data?cli=10&dat=s&url=$url");
return $xml->SD->POPULARITY['TEXT'];

}

No comments posted yet

Your Answer:

Login to answer
95 Like 6 Dislike
Previous forums Next forums
Other forums

PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26

DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This i

Else statement screws up all css
Does anyone know what goes wrong in the process with this php code?
This code seems to be causing

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

media recovery
Hi,
i startup the database i got the error

SQL> startup
ORACLE instance started.

Need help to modify php ELSE code
I'm trying to find a way to have the php code display a message if there is no inventory listed in t

Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bo

Batch Related Pricing
Hi, I need some clarity on the batch related pricing

For example the following are the b

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

setcookie and isset($_COOKIE(name)) seem very finnicky.
I'm currently playing around with a user system with login and registration. I'm trying to use cooki

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash