Get your external IP Address

4 Antworten

  1. tito sagt:

    how i make this to run every 6 hours ?

    i need it on my rapsbery pi

    • Hi! very easy, just define a new cronjob. For this, open /etc/crontab and add a new line:
      0 */6 * * * sh /home/pi/script.sh
      remember: 0 and */6 says that this script will be computed every 6 hours at minute 0. You will need to set the path to the script. If you need more information about cronjobs, look at this.

  2. Sajjad sagt:

    I want to get users real current IP using php how to get this?

    • You can use $_SERVER[‚REMOTE_ADDR‘] to get the most relevant IP address from the user… Normally this is his external IP, which should be the same when he has a static IP address or it changes (maybe daily) for dynamic IP addressing. But it can be also anything else, if the user uses VPN or things like TOR network.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.