I use a cose of a another post:
http://arduino.cc/forum/index.php/topic,95456.0.html
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x04, 0x16 };
char noipServer[] = "https://dynupdate.no-ip.com";
EthernetClient client;
void setup() {
Serial.begin(9600);
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
while(true);
}
//Give time to initilize:
delay(2000);
if(client.connect(noipServer, 80)){
Serial.println("Connected to noip");
client.println("GET /nic/update?hostname=johndoe.no-ip.org HTTP/1.0");
client.println("Host: dynupdate.no-ip.com");
client.println("Authorization: john.doe@gmail.com:mypassword");
client.println("User-Agent: Johns Arduino Client/0.0 john.doe@gmail.com");
client.println();
//Wait for response
while(client.connected())
{
// stay in this loop until the server closes the connection
while(client.available())
{
// The server will not close the connection until it has sent the last packet
// and this buffer is empty
char read_char = client.read();
Serial.write(read_char);
}
}
// close your end after the server closes its end
client.stop();
}
}
void loop() {
}
Thanks to all