Request for freedns
#1
I have a dynamic DNS account with afraid.org, and was wondering if someone could whip up a simple script that goes to a URL every 5 minutes or so. The site has a URL set up that will automatically assign your domain to the IP that accessed the URL.
Reply
#2
post the url and I will whip it up Wink
Reply
#3
http://freedns.afraid.org/dynamic/update.php?<ID>
Reply
#4
Here you go, just replace <add_your_id_here> with the letters and numbers after the ?

Code:
import xbmc, urllib2

theID  = '<add_your_id_here>'

# no need to change stuff under here..
theURL = 'http://freedns.afraid.org/dynamic/update.php?'+str(theID)
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
headers = { 'User-Agent' : user_agent }
try:
    response = urllib2.urlopen(theURL)
    html = response.read()
    xbmc.executebuiltin('xbmc.Notification(FreeDNS,' + html +')')
except:
    xbmc.executebuiltin('XBMC.Notification(FreeDNS, Update failed)')

hopefully this works (tested on my xbox) didn't work in linux

paste this into a file and save it in the scripts folder of xbmc
Reply
#5
Alright, thank you. Also, how do I make it start automatically with xbmc?
Reply
#6
save it as autoexec.py in your scripts folder.. but it only runs once every boot.
don't think the ip would change that often, better to run it manually
Reply
#7
now whip up that installer Tongue
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#8
Hi,
Do you habe something linke hat for xbmc Eden in Windows?

Thanks

Merry xmas

Tullm
Reply

Logout Mark Read Team Forum Stats Members Help
Request for freedns0