I have a dedicated webserver running PHP software which needs to automatically collect and update the IP’s of a couple Windows and possibly Linux machines of mine which have dynamic IP’s (roughly same idea as the no-ip.com client). The simplest thing to do I think is to run a service on each machine which simply pulls a unique URL from the webserver which can then lookup the client IP and match it with the URL etc.
$_SERVER["HTTP_CLIENT_IP"]
What’s the best language/library/environment to build a client service which can make a URL request with easy access to the machine’s external IP (to check for changes to the dynamic IP so as to not flood the webserver)? It need not be anything fancy, it doesn’t even need to read anything from the server, it just has to make the URL request.
Besides web programming, I have some experience with Python and C and a few others. Any pointers or resources I can read up on the subject would be appreciated. Also, am I over-thinking this? Thanks
you can write a shell script with wget calls followed by a sleep in a loop.
wget performs http requests and it’s available for windows and is already installed on all/some unix machines.