ID:182692
 
Hey guys I got a question for you! I'm needing a simple program on boot that posts a IP addy to a webpage. I'm setting up a networked camera for a customer and the guy has DSL with a dynamic IP. So I'm wanting to run a simple program to get his IP to my site so he can just go to it to get easy access. If anyone knows a site that explains how to makea simple program to post data to a page please give or if you just know an easy way to do it explain! Thanks guys. :)
Would something like dynDNS work for him? It would give him a simple url like "ry4n.dyndns.com" that would automatically point to his IP address. There would be a small program on his computer(or router, as many routers support dyndns or a like service) that would keep it up-to-date.

Failing that, an AutoIt or AutoHotKey script mixed with some basic PHP could automatically poll a URL on startup like "http://www.ry4n.com/ip/?ip=xxx.xxx.xxx.xxxx"
In response to Danial.Beta
Python:


import urllib2
import socket

def address():
return socket.gethostbyname(socket.gethostname())

urllib2.urlopen('http://ry4n.com/ip.php?ip=%s' % address())
In response to Crashed
going with dyndns.org and a small client program that updates the IP automatically is likely the easiest to set up and requires no programming.