Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. <?php
  2. header( "Content-Type: text/javascript" );
  3. ini_set('display_errors',1);
  4. error_reporting(E_ALL);
  5. include 'config.php';
  6.  
  7.  if (isset($_GET['url'])){
  8. $sql = mysql_query('SELECT Unix_timestamp(dates) AS created_unix, url, followed_by
  9. FROM inst_stat WHERE url = \''.$_GET['url'].'\'');
  10.     //while($row = mysql_fetch_assoc($sql)){
  11.    //$data[] = $row;
  12. // }
  13.     //  $json = json_encode($data);
  14.     //  echo $json;
  15.        
  16. //}
  17. $array = array();
  18. while ($row = mysql_fetch_array($sql)) {
  19.         $timedates = date( $row['created_unix']);
  20.     $followed_by = $row['followed_by'];
  21.             $url = $row['url'];
  22.         $array[] = '['.$timedates.'000,'.$followed_by.']';
  23. }
  24. $result = implode(',',$array);
  25.  
  26. print( $_GET["callback"].'(['.$result.']);' );
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement