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

Why do I get this error?
Error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or

Take info from one coloum and move to another
Hi all,

I have this:
Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_

How can I get my program to read a larger array ??
Hi:

I have this program that reads from an array to do calculations. The array are just t

Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other

ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,

Oracle 10g. Linux.

I'm facing the below error while trying to import a dumpfil

Linking with Foreign Keys
I have been getting an erro when I try and link:

create table Faculty_Specialty (I_Name v

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

Changing files over
Just thought I'd start with the new forums looking really nice .

Ok basically I've made this

cPanel API
Hi Guys,

Need a little guidance. I'm trying to get my script to communicate with cPanel (or W

Share admin accross websites
I'm using .net memberships and roles in one of my sites, but I need to be able to share logins and p

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