Skip to content

Instantly share code, notes, and snippets.

View tc0nn's full-sized avatar

Tim tc0nn

  • Home
View GitHub Profile
@tc0nn
tc0nn / nsupdate.php
Created April 26, 2022 12:55 — forked from mark-sch/nsupdate.php
PHP script to automate nsupdate calls for dynamic dns updates. This script and a properly configured bind nameserver allows hosting of custom dyndns services, e.g. updating own domain from Fritzbox.
<?php
// *** PHP script to automate nsupdate calls for dynamic dns updates.
// *** This script and a properly configured bind nameserver allows hosting
// *** of custom dyndns services, e.g. updating own domain from Fritzbox.
// *** usage: http://192.168.0.25/nsupdate.php?ns=ns0.mynameserver.de&domain=my.domain.de;my.domain2.de&newip=<ipaddr>
if (!isset($_SERVER['PHP_AUTH_USER']))
{
Header("WWW-Authenticate: Basic realm=\"Configurations-Editor\"");
Header("HTTP/1.0 401 Unauthorized");