The use of the ESP8266 in the world of IoT

User avatar
By mutthunaveen
#65738 Dear Board

Im trying to get temperature from website from my ESP controller. i used the same requests using IE and Fiddler they are working very fine. im doing nothing wrong also from ESP point of view.

please find my esp request and response below.

Code: Select allAT+CIPSTART="TCP","http://myesp8266.comlu.com",80\r\n
CONNECT

OK
AT+CIPSEND=93\r\n

OK
> GET http://myesp8266.comlu.com/temp_post.php?temps=15 HTTP/1.0\r\n
Host: myesp8266.comlu.com\r\n\r\n


Recv 93 bytes

SEND OK

+IPD,574:HTTP/1.1 302 Found
Date: Tue, 09 May 2017 02:20:31 GMT
Server: Apache
Location: https://www.000webhost.com/migrate?utm_source=000&utm_medium=rdr&utm_campaign=old_panel_off&static=true
Content-Length: 299
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://www.000webhost.com/migrate?utm_source=000&amp;utm_medium=rdr&amp;utm_campaign=old_panel_off&amp;static=true">here</a>.</p>
</body></html>
CLOSED



when i use IE i receive the following for the request
Code: Select allhttp://myesp8266.comlu.com/temp_post.php?temps=15

response ->
Notice: Undefined index: temperature in /storage/h9/116/1546116/public_html/temp_post.php on line 2
15
Temperature : Celcius



15 is what i expect and im receiving it good...

Below is the code from fiddler which im receiving good
Code: Select allsend ->
GET http://myesp8266.comlu.com/temp_post.php?temps=15 HTTP/1.0
Host: myesp8266.comlu.com

response ->
HTTP/1.1 200 OK
Date: Tue, 09 May 2017 02:08:40 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Server: awex
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Request-ID: ce6759371cbb05088c5c954aa35de737

<br />
<b>Notice</b>:  Undefined index: temperature in <b>/storage/h9/116/1546116/public_html/temp_post.php</b> on line <b>2</b><br />
15<p>Temperature :  Celcius </p>


where is wrong?? tried in many possible ways. but no success.

please help.

thank you