DNS with WIFI shield 3.0 (connect to my domain and not to google/twitter)

Hey guys,

Since about 3 months I am playing with the Arduino stuff, so far I am really successful, but today I could not solve my latest problem.

I got the WIFI Shield 3.0 of elechouse, works quiet fine as a server...

But I wanted to build a dynamic DNS and it cant solve the DNS, there is a comment that this shield needs an IP addresse.

I got a subdomain ( http://subdomain.xxx.de ) and if you use http://subdomain.xxx.de/?ip the php file on the server will change the addresse behind the links so that it will always point to the right IP...

So I broke it down and just tried to connect to my domain --> Still dosent work cause of the IP doesnt open the webside (behind the IP there are more websites.) SUCKS!

Someone got an idea for me how to connect to a domain where a IP doesnt work?


If you use a dynDNS service you don't need the PHP script changing the address of links on the whole site, just update your IP address each time it changes. The problem I see, with a WiFi shield you're usually behind a router which does NAT for the whole local network. So you cannot use the IP the Arduino got for the dynDNS update. Usually this is done by the router anyway, your router doesn't?

Show us the code you're currently using and describe what exactly happens when you run it as well as what you expect it to do.

The last part of your post sound to me like you're trying to access a web page but forget to set the "Host:" header line.

Sorry I dont have a dynDNS service, I want to build it by my own this is the problem

So far I got no code cause I dont know how to do the webclient without an IP of the page... The connection to the router works..

What the problem is: The Arduino should call the domain (lets say at nighttime all 5minutes) sub.domain.de/?ip and my script fetches the IP address and builds links like ip/?action=1.

If someone clicks on a link... My router will forward this to the arduino and I will get get this... the server part works, I just got the problem that I cant call my own domain/script...

The description says I need a IP address of the page... I havent got it cause there are more domains behind this page --> I dont know how to call the domain with the arduino/Wifi shield

the script... if(isset($_GET['ip'])){$db->ip($_SERVER['REMOTE_ADDR']);exit;}

function ip($ip=NULL){ if($ip!=NULL){ mysql_query("UPDATE tab SET value='$ip' WHERE name='ip'"); }else{ echo $ip = mysql_result(mysql_query("SELECT value FROM tab WHERE name='ip'"),0); return $ip; } }

Have you read the last sentence of my last post? You have to add a "Host: sub.domain.de" line to your HTTP header. As you haven't posted any code yet I cannot tell you what you have to change in your sketch, you have to do it. Don't expect us to write your whole sketch.

In the examples directory of your Ethernet library you'll find a WebClient example. Base your sketch on that. Post the code you have when you're stuck.

Thanks works great!!! Works perfect with the header! :-)

Unfortunately looks like I just can set up a webserver or a webclient and not both, but thats another problem.. :(

That's possible too (with some limitations), search in the forum, we had that topic some weeks ago.