Pages: [1]   Go Down
Author Topic: regular http requests  (Read 715 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

or even this one with ethernet already on it

http://www.skpang.co.uk/catalog/arduino-ethernet-without-poe-p-954.html
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The WebClient example coming with Arduino 1.0  shows you how to send a get request to a site.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 147
Posts: 6038
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is client code that does almost what you want. It loads Google every 10 seconds.
http://arduino.cc/forum/index.php/topic,99629.msg754629.html#msg754629

Change the server ip to yours.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

great thanks.

and which board would be the best one to use? all it will do is to send the http request.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is client code that does almost what you want. It loads Google every 10 seconds.
http://arduino.cc/forum/index.php/topic,99629.msg754629.html#msg754629

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?
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Function connect can also take the host name:
Code:
  virtual int connect(IPAddress ip, uint16_t port);
  virtual int connect(const char *host, uint16_t port);
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

great thanks.

and which board would be the best one to use? all it will do is to send the http request.
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: