Advertisement
VanGans

Alexa rank

Apr 10th, 2019
594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.55 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.    <html>
  6.  
  7.    <head>
  8.  
  9.    <style>
  10.  
  11.    
  12.  
  13.   #logo{
  14.  
  15. color:red;
  16.  
  17. padding-right:1300px;
  18.  
  19.    
  20.  
  21.      }
  22.  
  23.    #box{
  24.  
  25.    
  26.  
  27.   color:red;
  28.  
  29.   size:20px;
  30.  
  31.    
  32.  
  33.    }
  34.  
  35.    
  36.  
  37.    
  38.  
  39. .button {
  40.  
  41.     background-color: #4CAF50; /* Green */
  42.  
  43.     border: none;
  44.  
  45.     color: white;
  46.  
  47.     padding: 15px 32px;
  48.  
  49.     text-align: center;
  50.  
  51.     text-decoration: none;
  52.  
  53.     display: inline-block;
  54.  
  55.     font-size: 16px;
  56.  
  57.     margin: 4px 2px;
  58.  
  59.     cursor: pointer;
  60.  
  61.     -webkit-transition-duration: 0.4s; /* Safari */
  62.  
  63.     transition-duration: 0.4s;
  64.  
  65. }
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. .button2:hover {
  74.  
  75.     box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
  76.  
  77. }  
  78.  
  79.    
  80.  
  81.    
  82.  
  83.      </style>
  84.  
  85.    
  86.  
  87.    
  88.  </head>
  89.  
  90.    <body>
  91.  
  92. <center>
  93.  
  94.    
  95.  
  96.    <h1> Alexa Rank Checker Tool</h1><center>
  97.  
  98.    
  99.  
  100.    
  101.  
  102. <center>
  103.  
  104.  
  105. <h2>Domains/URLs:</h2> </div>
  106.  
  107. <form action="" method="POST">
  108.  
  109. <div id="box">
  110.  
  111. <textarea rows="10" cols="100"  name="url"  >
  112.  
  113. </textarea>
  114.  
  115. </div>
  116.  
  117. <br>
  118.  
  119. <br>
  120.  
  121. <br>
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. <input class="button button2" type="submit" name="submit" value="Go"/>
  130.  
  131.  
  132. </form>
  133.  
  134. </body>
  135.  
  136. </html>
  137.  
  138.  
  139.  
  140.  
  141.  
  142. <?php
  143.  
  144. if(isset($_POST['submit']))
  145.  
  146.  
  147.  
  148. {
  149.  
  150. $url=$_POST['url'];
  151.  
  152.  
  153.  
  154. $xml = simplexml_load_file('http://data.alexa.com/data?cli=10&dat=snbamz&url='.$url);
  155.  
  156. $rank=isset($xml->SD[1]->POPULARITY)?$xml->SD[1]->POPULARITY->attributes()->TEXT:0;
  157.  
  158. $web=(string)$xml->SD[0]->attributes()->HOST;
  159.  
  160. echo $web." has Alexa Rank ".$rank;
  161.  
  162. }
  163.  
  164. ?>
  165.  
  166. </center>
  167.  
  168.  
  169. </div>
  170.  
  171.  
  172.  
  173. </body>
  174.  
  175. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement