-->
Page 1 of 1

ESP8266 reports DNS fail when loading php URL

PostPosted: Wed Mar 30, 2016 7:38 am
by sam000
Using an ESP8266 and using the following AT commands I can successfully get the webpage:

AT+CIPSTART="TCP","www.somewebsite.com",80
AT+CIPSEND=80
> GET http://www.somewebsite.com HTTP/1.0
<I get a bunch of HTML here>
So far so good. Now I have a php page on my website that takes a few parameters and updates a table in a database accordingly. So when I type:

http ://www.mywebsite.com/mypage.php?arg1=one&arg2=two

It successfully updates the table. Now when I try to use ESP8266 to do the same I get a DNS fail:

AT+CIPSTART="TCP","http://www.mywebsite.com/mypage.php?arg1=one&arg2=two",80
<get DNS fail here>
Even if I try the php page without the arguments I get DNS fail:

AT+CIPSTART="TCP","http://www.mywebsite.com/mypage.php",80
<get DNS fail here>
Does anyone know what's going on? Could it be that the php page is not on port 80? And if that's the case, how do I find out what port it's on?

By the way, if I do the same with an html page on my website it works just fine.

EDIT: When I try this:

AT+CIPSTART="TCP","www.mywebsite.com",80
> GET /mypage.php?arg1=one,arg2=two
I get this output:

Error 404 - Not Found

And when I try:

AT+CIPSTART="TCP","www.mywebsite.com",80
> GET http://www.mywebsite.com/mypage.php?arg1=one,arg2=two
I get the html code of www.mywebsite.com/index.html and not the php page.

Could somebody please help me?
Thanks!

Re: ESP8266 reports DNS fail when loading php URL

PostPosted: Thu Feb 22, 2018 4:13 am
by Akash Swaminathan
Hello sam , I have the same trouble , is your issue salved. I hope its because of the Dynamic IP address that you have, may be the ESP8266 is not able to connect to the website.