Ethernet GET/POST Controls?

Hello I'm trying to understand the whole get and post for controlling and sending information over the internet. I hope this is posted in the right place. I know how the post part of it works it sends the information of whatever you want to monitor over the internet to a server and able to store itnin mysql or some type of database. But what does the GET part actually do? I'm getting mixed information about it.

What I'm trying to do in a future project is to control things over the internet from my website to my arduino without having to port forward stuff. I have the post part already working i can receive from the arduino to my web page and it stores information in mysql. Any help would be great thank you.


But what does the GET part actually do? I'm getting mixed information about it.

Typically, GET is used to get data from a server. Often, there are name equal value pairs as part of the request, to define what the server is supposed to do. For example, if you use google to search for "Arduino", the web browser shows:
where https is the protocol, is the server, and search?q=Arduino&ie=utf-8&oe=utf-8&client=firefox-b-1is the script on the server to execute, with the name = value pairs being what to search for, what encoding to use to show the results, and which client (type) made the request.

The Arduino would make a GET request using the same string:
GET search?q=Arduino&ie=utf-8&oe=utf-8&client=firefox-b-1 HTTP/1.1

The script on the server is free, of course, to use the name equal value pairs for whatever purpose it is designed for, so a GET request can be used to, for instance, store data in a database, with the script actually generating no real response.

It would be more typical to use a PUT request for that, but PUT requests are pretty rare, since GET can be (mis)used for the same result.

Hello PaulS thank you. Everything i been researching about led control through Ethernet using php and mysql is more about monitoring stuff then controlling stuff. Everything most i found that does control leds are on SD card. I can't find a example on how to control leds through php and mysql.

Does anyone have a example on how to control led's through mysql? I been searching all over and i have no clue.

GET and POST work identically with differing syntax. They are both Method declarations as part of HTTP. When you type a URL into your web browser, your browser forms a GET request for that URL. See RFC2616 for very specific information on HTTP. HTTP is a way of sending Hypertext, which can be parsed into a command string. It might be easier to use UDP instead of HTTP, but either will work.