arduino - How to receive data from ESP8266 Wifi Module using php -
i tried sending request using esp8266 wifi module using arduino.the module responded :
send ok +ipd
on server, want receive data , write in text file. tried following codes
>parse_str( html_entity_decode( $_server['query_string']) , $out); $data= $out['data']; $filestatus=file_put_contents('myfile.txt',$data,file_append); if($filestatus!=false){ echo "success"; } else{ echo "fail"; }
but data failed store.
assuming request esp server made url http://example.com/myphpscript.php?parameter1=xxxx¶meter2=yyyy
you should able the value of parameter1 , paramter2 this:
<?php $p1 = $_get['parameter1']; $p2 = $_get['parameter2']; $data = $p1.','.$p2; file_put_contents('myfile.txt',$data,file_append); ?>
Comments
Post a Comment