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

Give me all your tricks for minimizing jar file size

Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w

Form errors in an array
I'm processing a form and putting the errors in an array. empty($errors) doesn't seem to do the tric

Getting the full city list from maxminds geoip database
I am suprised I can't find any references to this.

I have maxminds geoip lite installed and i

'210010106140040100' == '210010106140040101'
Debugging this simple line of a PHP script

Code: if($a == $b){ }
I've found that with val

mysql VARCHAR acting like INT
Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column

Keeping track of php uploads
Hello all.

I was looking at the way PHP handles file uploads.
It seems that PHP uses a tem

Multiple includes losing variables
Hey all,

just starting out w php and ran into a problem pretty quickly. I'm
including seve

simple ping code
been searchin the site/web and found code thats simple but doesnt work.

I have a personal we

Remove values in array2 from array1
I have two arrays.

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

Please help - should be a simple fix.. driving me nuts
Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and

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