ssegu2
June 22, 2018, 9:30am
#1
I have read several posts here on the above subject and tried some of the suggestions but i still have no success sending data from Arduino to my website.
I am sending to arduino.php which is in my public_html folder. Here is my PHP code:
<?php
$value = $_GET["value"];
echo 'Data received from Arduino =' .$value;
?>
Here is the Arduino code:
sendToWifi("AT+CIPSTART=\"TCP\",\"ssegu2.000webhostapp.com\",80",1000);
sendToWifi("AT+CIPSEND=63",100);
sendToWifi("GET https://ssegu2.000webhostapp.com/arduino.php?value=martin",1000);
sendToWifi("AT+CIPCLOSE",100);
Here is the response i get on my serial monitor:
Sent command to ESP8266-01: AT+CIPSTART=“TCP”,“ssegu2.000webhostapp.com ”,80
Response from ESP8266-01: CONNECT
OK
Sent command to ESP8266-01: AT+CIPSEND=63
Response from ESP8266-01:
OK
Sent command to ESP8266-01: GET https://ssegu2.000webhostapp.com/arduino.php?value=martin
Response from ESP8266-01:
Recv 63 bytes
SEND OK
Sent command to ESP8266-01: AT+CIPCLOSE
Response from ESP8266-01: CLOSED
This entire exact setup works perfectly on the server on my local machine but no on my 000webhost website:worried:
Any help will be appreciated.
teodor
June 22, 2018, 4:34pm
#2
Hi @ssegu2 !
000webhost does not block GET/POST requests based on certain criteria.
Try using HTTP instead of HTTPS: http://ssegu2.000webhostapp.com/arduino.php?value=martin
ssegu2
June 23, 2018, 7:04am
#3
Hello teodor. Thanx for your prompt response. I have tried your suggestion
Unfortunate I still get the same response.
Sent command to ESP8266-01: AT+CIPSTART=“TCP”,“ssegu2.000webhostapp.com ”,80
Response from ESP8266-01: CLOSED
AT+CIPSTART=“TCP”,“ssegu2.000webhostapp.com ”,80
CONNECT
OK
Sent command to ESP8266-01: AT+CIPSEND=63
Response from ESP8266-01: AT+CIPSEND=63
OK
Sent command to ESP8266-01: GET http://ssegu2.000webhostapp.com/arduino.php?value=martin
Response from ESP8266-01:
Sent command to ESP8266-01: AT+CIPCLOSE
Response from ESP8266-01: T+CIPCLOSE
busy s…
Recv 63 bytes
SEND OK
When I type the url
http://ssegu2.000webhostapp.com/arduino.php?value=martin
directly into my web browser, it works - so my php side is surely ok:grin:
Any other suggestions please or can any one here share Arduino code that has worked?
Thanx.
Maybe it is being received but just echoed? You cannot know if it was received if you just echo it
royal
October 26, 2019, 5:53pm
#5
buenos dias, se soluciono algo al fin de cuentas, ahora yo estoy teniendo el mismo problema y no encuentro el problema, he seguido todos los foros pero aun nada…
agradezco toda la informacion de como solucionaron.