diff --git a/reader/simulate.php b/reader/simulate.php new file mode 100755 index 0000000..4eced54 --- /dev/null +++ b/reader/simulate.php @@ -0,0 +1,62 @@ + $mac_addresses[ rand(0, sizeof($mac_addresses)-1) ], + "essid" => $ap[ rand(0, sizeof($ap)-1) ], + "signal" => rand(0, 100), + "latitude" => 41.909986, + "longitude" => 12.3959152, +]; + +// Invio dati tramite la libreria cURL +$ch = curl_init($receiver_url); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data)); + +// Invio dati +$response = curl_exec($ch); + +// Chiusura handler +curl_close($ch);