Jump to content

A scrpit to announce ip address


Recommended Posts

Hi all, is there a script that can announce your ip address?


What I mean is a script in the desktop server that would send the updated ip address to perhaps my hosted website, so users will know where to go next time. Or perhaps email them all?


This is because I do not have a static ip address.

Link to comment
Share on other sites

I was thinking of doing something similar, and this is what I would do:


buy a domain name, then create an index file that would grab the location from a database (if I used an IP) and use a header redirect to send them to the IP address.


On the host computer, I would then create a script that checked its IP address every 5 minutes or so, and if it has changed update the server, then update a file on the computer saying its current IP address.


Now, you won't have to connect to a database every 5 minutes, you just would read in a value from the local machine. and if it is different from the current IP then you connect to the database update it with the new value and update the local file with the new value.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.