Advertisement
tyler569

Untitled

Jun 23rd, 2012
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.25 KB | None | 0 0
  1. <?php
  2. $con = mysql_connect("localhost","DFdsfdsaf","sadfsdafdsafdsa");
  3. mysql_select_db("url", $con);
  4. $i=$_GET['id'];
  5. $idx = "http://lyno.in/";
  6. $ids = "$idx$i";
  7. $result = mysql_query("SELECT COUNT(short) FROM traffic where short= '$ids'");
  8. $resul = mysql_query("SELECT distinct ref FROM traffic where short = '$ids'");
  9. $resu = mysql_query("SELECT distinct country FROM traffic where short = '$ids'");
  10. echo "Link: ". $ids ."";
  11. echo "</br>";
  12. while($row = mysql_fetch_array($result)){
  13.     echo "Clicks: ". $row['COUNT(short)'] . "";
  14.     echo "<br />";
  15. }
  16. echo "</br>";
  17. echo "Referer Websites:","</br>";
  18.  
  19. while($ro = mysql_fetch_array($resul)){
  20.     $r = $ro['ref'];
  21.     $results = mysql_query("SELECT COUNT(short) FROM traffic where ref= '$r' and short = '$ids'");
  22.     while($rows = mysql_fetch_array($results)){
  23.         echo $ro['ref'];
  24.         echo ": ";
  25.         echo $rows['COUNT(short)'];
  26.         echo "<br />";
  27.     }
  28. }
  29. echo "<br />";
  30. echo "Country:","</br>";
  31. while($rowsq = mysql_fetch_array($resu)){
  32.     $rs = $rowsq['country'];
  33.     $results = mysql_query("SELECT COUNT(country) FROM traffic where country= '$rs' and short = '$ids'");
  34.     while($rowss = mysql_fetch_array($results)){
  35.         echo $rowsq['country'];
  36.         echo ": ";
  37.         echo $rowss['COUNT(country)'];
  38.         echo "<br />"
  39.     }
  40. }
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement