ID:182692
Mar 4 2008, 5:31 am
|
|
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. :)
|
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.
|
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"