Dynamic FreeDNS Internet Protocol Address Updater Installation Instructions

1. Extract the archive and copy all files except installation files to wherever it is on your web server that you want to run the interface part of the script. This should be someplace on your server where you can run php scripts in a browser. A password protected directory on your web server is a fine place.

2. Most people will need to follow this step. If you have wget enabled on your online web server, then you can skip this step and you will be able to run "dfdns.php" from your web server

Copy the files;
"closedb.php," "dbconnect.php," "dfdns.php," "footer.php" into a new folder, "/opt/dynamicfreedns/" or wherever it is on your server that you store files that run using the system's php configuration, rather than your web server's php configuration. The root of your drive might be a good place, or as I recommend, in the "/opt/dynamicfreedns" folder if you have one. This is because a lot of online web servers don't enable wget whereas most system php configurations do allow wget. If your system does, fine, you can run the script in a browser and you'll have a nice interface to watch the fireworks. However, if you are like most people, you'll need to run the script where it uses your system's php.ini file. If you run the script from a web browser and it looks like it works and you get through and it says it did everything but then you check with your dynamic DNS provider and it didn't update, check and see if you have wget enabled. If not, that's most likely the reason. If it doesn't work for another reason, the script will let you know why not.

3. Edit the file, "dbconnect.php" and enter your database hostname, database username, and database password. Save the changes. For most people, the hostname will be "localhost." This is the only file you need to edit.
4. Create a mySQL database called, "dynamicfreedns" and import the file, "installation/dynamicfreedns.sql" into your mySQL database using PhpmyAdmin or whatever tool you like.
5. You'll then be able to use the interface that allows you to add domains and update URLs that get executed when the server's i.p. changes. You also need to make the configuration settings, of which there are only two.
6. You can choose for the script to get your server's internet protocol address from your router, which is not supported on all routers, or from a remote location. The remote location is where you have a script that returns your i.p. address, and nothing more. There are most likely some free ones on the internet that you can use or I have included a copy in the installation folder so that you can upload it to a server if you can't or don't want to use the router method for getting the server's i.p. address. Upload it somewhere and then you can tell the script where it is. Other pages on the internet will also work if you find them, but it's important that they return only the i.p. address. If the page returns anything more it will put excess load on both your server and your dynamic i.p. updater's server by updating urls each time the script runs.
7. You need to schedule Dynamic FreeDNS to run every minute or however often you like. A crontab has been included that will run "/opt/dynamicfreedns/dfdns.php" every minute. You can import this file into your root user's crontab or manually edit the root user's crontab to include the important line of the file. You can use whatever scheduler you like, even Windows Scheduler works fine but cron jobs are recommended.
8. Go to your dynamic DNS provider, such as FreeDNS at Afraid.ORG and change your domain i.p. settings to something else. Then reset the i.p. which is stored in the database to via the "/dynamicfreedns/index.php" Then let the scheduler run the script. Wait at least one minute, or until your i.p. is checked and check with your dynamic dns service provider and see if it updated. If so, you know it worked. If not, go to phase two. Reset the i.p. address to again in the DynamicFreeDNS and then open "dfdns.php" in a web browser. You'll see if you are getting your i.p. address and what is going on by doing this but it's important to remember that on most servers, wget will not work and therefore when you do this the update is most likely not actually taking place. It's good for testing up until that point. If that doesn't help you, then it's time to get serious with phase three; command line. Open a terminal window or command prompt and enter "php /opt/dynamicfreedns.php" (or wherever you stored your copy of "dfdns.php" that will be used by the system, not the copy on your browser which is only for testing) and look and see what errors you get. Most people don't get that far but if you have trouble, this will run it as the system does when cron or a scheduler runs it.