Web Hosting Talk







View Full Version : Need a very special script...


Alex
07-02-2005, 09:38 PM
Hello guys,
I am in need of a very special script (that I hope to write myself).
Heres what is has to do...

It has to find the IP of a specific computer and then write the IP to a webpage.
First off, what language should the script be in?
Second, should the script be on the computer, or the webserver?

I was thinking of something in linux where a crontab runs the script every 2 hours and updates the IP on a web page, since the server doesn't have a static IP.

Any help would be great,

HostRefugee-Vince
07-03-2005, 01:51 AM
The script would have to be on the computer, not the webserver. Since the computers IP may change, the web server would have no clue how to contact the computer to get the updated IP.

What it seems like you need is 2 things.
#1 A program on the computer that connects to your website every so often.
#2 A script that it connects to that will update the webpage that the IP will be stored on.

The program on the computer could connect to a script that will look somewhat like this http://yourdomain.com/IPUpdate.php?IP=xx.xxx.xxx.xx

Where xx.xxx.xxx.xx would be the IP of the computer.

The program for your computer could easily be made by someone familiar with Visual Basic since there is not really much to the program itself.

Hope this was helpfull!

Alex
07-03-2005, 12:46 PM
Thanks, I was feeling a bit lost.
I'll try what you reccomended and I'll let you all know how it turns out.