1234567891011121314151617181920 |
- <?php
- $bssid = $_POST ["bssid"];
- $timestamp = $_POST ["timestamp"];
- $username = "hostage";
- $password = "hostageDB";
- $hostname = "localhost";
- $dbhandle = mysql_connect ( $hostname, $username, $password ) or die ( "Unable to connect to MySQL" );
- $result = mysql_query ( "SELECT * FROM `hostage`.`sync` WHERE `bssid` = " . $bssid . " AND `timestamp` > " . $timestamp );
- if (! $result) {
- die ( 'Could not select record: ' . mysql_error () );
- }
- while ( $row = mysql_fetch_array ( $result ) ) {
- echo json_encode ( $row );
- }
- ?>
|