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



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

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to re

parsing error
can anyone explain this syntax error:

Parse error: syntax error, unexpected T_IF

The e

DateObject and Nulls
Hi all,

I have an array mapped to a value object. One of the items in the array is a PHP Date

Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

PHP header help!
Hi all I am trying to get this php page to refresh every 5 seconds on my phone which is an aastra 48

PHP mail() with images
I'm trying to get images to send along with my HTML e-mail sent through PHP mail(). I only tried vie

Can php detect connection speed and thereafter swap out elements?
No code to post, lads, yet. Just looking for a yay or nay at this stage:

Can a php script be

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

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