PHP Code Get Alexa Rank and Site Linking

May-25-2014 in PHP No comments

In this post, I will explain how to use PHP code to get Alexa rank and site linking of your blog or website using a simple PHP script

Get Alexa Rank and Site Linking

How to Find Alexa Rank?

 

The PHP code to get Alexa rank and sites linking in is pretty simple and straightforward:

The URL to get the Alexa rank and some other useful fields in XML format is:

 

Note that it has several important fields like popularity, DMOZ listings, the countries in which the site is most popular etc.

To parse this XML file either you can use regular expression match or use initialize curl with given url. here i am doing this with curl_init()

 

How to get the Alexa rank and Site Linking from PHP?

Here I’ going to show an easy way to get alaxa rank information of your website or other website by using php code.

 

The Usage

Provide one paramenters: your domain.

This Demo Alexa Rank checker

Note: You can add a widget alexa rank checker to your webpage Free Alexa Rank Checker Widget

Add Your Comment