Download Perl Scripts

DIP Update 31124-2104DIP Update - $0 Version 31124-2104
Add to Cart

RSS Feed

DIP Direct Script by
(c) 2003 Jason Silver


The Dynamic IP Direct script is free.

This automates the process of updating an ever-changing IP address
like the kind you get from a dial-up account. Even Home DSL and Cable
Internet connections can change your IP address without warning, unless
you pay big-bucks for a static IP. If you're behind a firewall, then
some software solutions will not be able to report your true firewall.
For example, CJB updater reports your local ip address, not your
Internet-assigned IP address.

This script is a solution to this problem. It reports your IP address
to any kind of updating IP address site like, and saves your
real IP to a text file on the server.

Report any bugs or improvement suggestions to

Jason Silver


How It Works:

The script reads the IP address of the user who visits it, and sets that IP
as the correct IP for your subdomain, (like

If there is a change to the IP from what was previously set, it sends an
email to you and records the new IP at the subdomain host site. It also saves
the IP to a text file in case the subdomain site is down for any reason.

If you have Windows, you can call the script automatically by calling it
from your Active Desktop. Either set the active desktop to update itself
every few minutes or hours, or turn the META refresh tag on in the settings
at the top of the script.

Installation Overview:
1. Sign up for a CJB account, or a similar service.
2. Set some options at the beginning of the script
3. Use FTP to upload the file
4. Set exectute permissions on the Perl script, and write permissions on the text file
4. Test the script

Here's How!

1. Go to and sign up for a free subdomain account. You should be able
to register a free without much difficulty.
If you already have an account with CJB, or another service, then great!
If it's another service, you'll need to locate the script on their site which
updates the IP address.

2. Using a text editor like textpad, or notepad, open the script
Change the path to perl so that it's
configured for your server.
It's usually:

3. Change the variables, especially the location of sendmail, your email address,
and the login and password for your subdomain account.
For example,
$sub_domain_script = "$ip_address";
Find the spot that says username=username and set it to be username=yourrealusername.
Do the same for password. Be sure to leave the ip=$ip_address. You might have to play with
this part slightly to make it work for other subdomain sites. For example, they might
require you to put myip=$ip_address, or ipaddress=$ip_address. A good way to find out
is to visit the site, find the form for manually updating, and then to look at the
source code to find the 'name' of the input boxes.

4. Use an FTP program like WS_FTP or CuteFTP (just some examples I'm aware of) and
upload the files to your server's cgi-bin.

(The script should automatically intranet_ip_address.txt. If it does not, or
you're having trouble saving the IP address to the server, upload a blank text
file by this name and set the permissions to be writable (eg: CHMOD 777, or 766)

5. Set permissions (CHMOD) on the file to be executable. (755).
The owner should be able read, write, and execute.
The group should be able to read, and execute.
Also, other should be able to read, and execute.


7. From a browser, open the script

It should report something like the following:

Mon Oct 27 11:05:49 2003
The IP Address has been updated on the server.

Copyright 2003 DIP Version 31027-1146 Put it somewhere near the bottom of your page.

If everything is working, you should receive an email with the IP address as well.

As always, let me know of problems, questions, or requests for features.
Jason Silver


top next download faq xml pad file RSS Syndication OPML List - All Programs


FileCABINET Script - Create a File Download section on your site.

In the Spotlight

Tell A Friend $0.00
Add to Cart
 This is an easy to install "Tell a Friend" script which allows your visitors to refer their friends to your site. It does not record their email addresses, but simply allows them to quickly send an email about your site.
[more & download links]

What People Say

Bible in One Year $0
Add to Cart Just what I've been looking for!
Thanks for such a great script!

[more & download links]

Post Page Comment