system
April 17, 2012, 9:25pm
1
Hi,
just a quick question.
how difficult would if be to set up the arduino with the ethernet shield and program it so that it will send a http request in specific intervals.
So for example send every hour a request to http://www.domain.com/page.php?id=27364
There would be no return data.
Thanks.
system
April 17, 2012, 9:28pm
2
The WebClient example coming with Arduino 1.0 shows you how to send a get request to a site.
Here is client code that does almost what you want. It loads Google every 10 seconds.
This loads www.google.com every 10 seconds. Don't do that to Google too long. Besides, it is a big page and takes a while to display at 9600 baud. Change the server ip to yours. #include #include byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE,...
Change the server ip to yours.
system
April 17, 2012, 9:39pm
5
great thanks.
and which board would be the best one to use? all it will do is to send the http request.
system
April 17, 2012, 9:42pm
6
SurferTim:
Here is client code that does almost what you want. It loads Google every 10 seconds.
Inconsistent HTTP Connnection - #18 by SurferTim - Networking, Protocols, and Devices - Arduino Forum
Change the server ip to yours.
Just had a look at the example and it takes only an IP but I will need to send also some GET parameters and send it to a domain not to a IP.
any chance how to change this?
Function connect can also take the host name:
virtual int connect(IPAddress ip, uint16_t port);
virtual int connect(const char *host, uint16_t port);
and which board would be the best one to use? all it will do is to send the http request.
You said you already have the ethernet shield. You don't need any extra board.
system
April 17, 2012, 11:21pm
10
I am completely new to this and I was planning on using the arduino and the ethernet shield but I have also seen that there are some boards with ethernet already on. Really unsure of what board is best to get for this project.
thanks a lot for all the help
The boards with ethernet already on them are basically the equivalent of Arduino + ethernet shield. They just take less space. They may also be cheaper.