ok, I don't think I explained it well enough.
I think it will be easier if I just paste the script... then you can pick it apart.
Code:
#!/bin/bash
BASEDIR=~/scripts/fsip ##The name of the folder you keep all your text files
NEWIP=$BASEDIR/newip ##Location of the text file that will store the address of the CLIENT
SERVER=example.com ##Name of the server that hosts the IP
RHOME=/home/fsip/ ##Target Directory on the server (the location of the SERVER script)
GETIP=example2.com/ip ##The server[s] that send back the Clients public IP. (calls a webpage with this php code: <?php echo $_SERVER['REMOTE_ADDR']; ?>)
PUBIP=`lynx -dump $GETIP` ##Getting the CLIENT's current ip address (of course this requires lynx... elinks should work too)
#-----------------------------------------------------------------------------------------------
if [ "$PUBIP" != "$NEWIP" ]; then
echo $PUBIP > $NEWIP
scp $NEWIP $SERVER:$RHOME/`hostname`-ip.txt
fi
---------------EDIT------------------
If anyone cares... (which I doubt because no one took the time to respond) I
came up with a better solution with the help of a php guru.
If you interested in a fake static IP, email me.