Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header( "Content-Type: text/javascript" );
- ini_set('display_errors',1);
- error_reporting(E_ALL);
- include 'config.php';
- if (isset($_GET['url'])){
- $sql = mysql_query('SELECT Unix_timestamp(dates) AS created_unix, url, followed_by
- FROM inst_stat WHERE url = \''.$_GET['url'].'\'');
- //while($row = mysql_fetch_assoc($sql)){
- //$data[] = $row;
- // }
- // $json = json_encode($data);
- // echo $json;
- //}
- $array = array();
- while ($row = mysql_fetch_array($sql)) {
- $timedates = date( $row['created_unix']);
- $followed_by = $row['followed_by'];
- $url = $row['url'];
- $array[] = '['.$timedates.'000,'.$followed_by.']';
- }
- $result = implode(',',$array);
- print( $_GET["callback"].'(['.$result.']);' );
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement