2 import urllib2, socket, urllib, sys
4 # configuration variables
7 password = 'yourpassword'
8 domain = 'your.domain.ralfj.de'
9 # END of configuration variables
11 # check if the domain is already mapped to our current IP
12 myip = urllib2.urlopen('https://'+server+'/checkip').read().strip()
13 currip = socket.gethostbyname(domain)
18 # we need to update the IP
19 result = urllib2.urlopen('https://'+server+'/update?user='+urllib.quote(user)+'&password='+urllib.quote(password)+'&domain='+urllib.quote(domain)+'&ip='+urllib.quote(myip)).read().strip()
20 if 'good '+myip == result:
21 # nothing to do, all went all right
24 # there was an error :(