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

Problem with coding MySQL query
I'm having heaps of trouble getting one of my PHP/MySQL queries to work for some reason (and the fun

Must be a string? Huh, what? HELP?
with the following script, I get
Fatal error: Property name must be a string in /home/content/e/

GET * FROM _____ Except?
I have a site that is for stock photography.

This section of the code calls images to display

PHP Function Page Advice
Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and edu

Simple MySQL query...
Hello,
How could I do a mysql query that does this: SELECT * WHERE date/time < 5minutes ag

Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?

$playern

Why is the logic of this simple code not working?
Hey, I'm trying to determine if a table already exists in mysql, but doing a query first with mysql_

How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not g

finding key position of specified value in multi-dimensional array
Code: $openedfile = fopen($tfc_file4, "r");
$rc = 1;
while(!feof($openedfile))
{<

Multiple websites question.
Hi, does php have any functionality that enables a programmer to extract information from a website

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