Go Down

Topic: led on trough my webpage using Post, not Get!!! (Read 677 times) previous topic - next topic



For 4 days I've been googling about it, and I couldn't find an example on how to control my arduino only using the internet. I want to be able to light a led trough a post in my website, because get it's not that safe. If anyone could point me a direction, I would be much aprecciated.
Thank You!!


Where is your website located? In the Arduino?

Why is GET not safe, do you know that?
This... is a hobby.


The website for now is hosted in my laptop, in a xampp on windows just for tests. I consider much secure way to not write data in url, but there is no such thing as security, I know. But if only I don't have it write down on a url, i consider it less dangerous.

So I have now achieved to even connect to the page and submiting data as I can see it in the serial, but the post returns an error. Here is some of the code to who is searching as I was:

if (client.connect(server, 80)) {
    // Make a HTTP request:
          client.print("POST http://192.168.xxx.yyy/arduino/public/index/led HTTP/1.1" "\r\n"
          "Host: 192.168.xxx.yyy" "\r\n"
          "Content-Type: application/x-www-form-urlencoded\r\n"
          "Content-Length: 7" "\r\n"


where content-length is the size of the string below:"test=15".

just now I have a Error HTTP 500 Internal server error, so I don't really know what it is but maybe I'll figure it out over night!

If anyone knows how to delete this error, opinions and guesses are welcome!1 :)


Don't you have to indicate a file in your path? I'm not 100% sure that it will point to index.html.

Why writing in English? If you do know English, why not posting in the main forums where a staggering amount of people can speak it natively in comparison to maybe 1 or 2 people in this sub-forum?

Does your page work when you access it from another computer? Not the computer that you have it stored in, another computer connected in the same place as Arduino.
This... is a hobby.

Go Up