Skip to content

Instantly share code, notes, and snippets.

@spicydog
Last active February 17, 2020 12:34
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spicydog/0cce874e840e1f844395 to your computer and use it in GitHub Desktop.
Save spicydog/0cce874e840e1f844395 to your computer and use it in GitHub Desktop.
PHP Script for updating ip for no-ip DDNS and example script for crontab
# Update no-ip ip every one hour
0 * * * * curl "YOUR_HOST_URL/noip-updater.php" > /dev/null 2>&1
<?php
$user = 'NP-IP USERNAME';
$pass = 'NO-IP PASSWORD';
$host = 'NO-IP HOSTNAME';
$ip = $_SERVER['REMOTE_ADDR'];
$url = "http://$user:$pass@dynupdate.no-ip.com/nic/update?hostname=$host&myip=$ip";
echo $result = file_get_contents($url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment