HostOnNet Blog

Python script to update

Looking for Linux Server Admin or WordPress Expert? We can help.

I want to set DDNS (Dynamic DNS, that will point A record like to your dynamic IP) with, i don’t want to install their program. I found they allow making custom clients. I made a small program in Python to do the update. Here is the code

import urllib

myurl = ""

web_page = urllib.urlopen("")
myip =

print "Your IP is " + myip + "\n"

update_url = "http://" + username + ":" + password + "" + myurl + "&myip=" + myip

print update_url + "\n"

print urllib.urlopen(update_url).read()

You can run it with crontab or schedule task.

Posted in Python

6 Responses to Python script to update

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.