Hãy chọn Truy cập mobile | Tiếp tục

Nét Đẹp Việt Nam

 Quên mật khẩu
 Register
Xem: 1701|Trả lời: 0

PHP script to check Alexa Ranking

[Lấy địa chỉ]
Đăng lúc 3-12-2014 17:26:53 | Xem tất |Chế độ đọc
How easy to create a simple php script to check a website Alexa Ranking.

  1. <form name="DomainForm" method="get" action="">
  2. <br>
  3. <table width="490" border="0" bordercolor="#330099" align=center>
  4.   <tr>
  5.     <td width="584" height="30" colspan="2" bgcolor="#0099CC"><div align="center"><strong>Domain Name</strong>:
  6.           <input type="text" value="google.com" name="domain" maxlength="63" size="30"> <input type="submit" value="Lookup">
  7.     </div></td>
  8.     </tr>
  9.     <tr>
  10.     <td>(*)<i>To check Google Indexed, Backlinks, PageRanks, Alexa..etc</i><br>
  11.     Whois Domain Checker ( <a href="whois.php" title="Domain Whois Tool"><b>click HERE</b></a> )</td>
  12.     </tr>
  13. </table>
  14. </form>
  15. <?php
  16. $domain=$_GET["domain"]; //your domain name
  17. //start alexa rank
  18. $xml = simplexml_load_file('http://data.alexa.com/data?cli=10&dat=snbamz&url='.$domain);
  19. $alexarank=isset($xml->SD[1]->POPULARITY)?$xml->SD[1]->POPULARITY->attributes()->TEXT:0;
  20. $alexaweb=(string)$xml->SD[0]->attributes()->HOST;
  21. //end alexa rank
  22. echo "$domain &nbsp;has Alexa Rank ".$alexarank;
  23. ?>
Sao chép mã

Save these source code as alexa.php
You can visit at : http://netdepviet.org/seo-tools/?domain=netdepviet.org



Bài viết liên quan

Bạn phải đăng nhập mới được đăng bài Đăng nhập | Register

Quy tắc điểm

Phòng tối|iPhone|Archiver|G+|Youtube|Facebook|Twitter|Contact| Netdepviet.org

GMT+7, 29-3-2024 03:23 AM , Processed in 0.022181 second(s), 21 queries .

Powered by Discuz! X3.2

© 2006 Made with in Hanoi,Vietnam and Contents are published by all members

Trả lời nhanh Lên trên Trở lại danh sách