1

I want to get value in NodeMCU module from my own page, hosted by free hosting. Final URL is: boiler.atwebpages.com/boi.php. First, i perform connect to server: client.connect(boiler.atwebpages.com, 80)

and send request

client.println("GET /boi.php HTTP/1.0");
client.println()

And here's the problem. First microchip get IP from boiler.atwebpages.com (which is 83.125.22.211) and try to get file boi.php. In fact, it try to access into 83.125.22.211/boi.php, which doesn't exist, so i get 404 error. Is that possible to get information from direct URL or get direct path from IP address?

0

1 Answer 1

1

You need to send the Host header with the request:

client.println("GET /boi.php HTTP/1.0\r\nHost: boiler.atwebpages.com\r\n");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.