diff --git a/php/index.php b/php/index.php new file mode 100644 index 0000000..ba41e10 --- /dev/null +++ b/php/index.php @@ -0,0 +1,200 @@ + 255) + return false; + } + return true; + } + + function getFormValue($varname, $defaultValue){ + $retVal=$defaultValue; + if ( isset($_POST[$varname]) ) + { + $retVal = $_POST[$varname]; + } + else if ( isset($_GET[$varname]) ) + { + $retVal = $_GET[$varname]; + } + return $retVal; + } + + $remoteip = $_SERVER['REMOTE_ADDR']; + + // retrieve parameters + $ip = getFormValue('address',$_SERVER['REMOTE_ADDR']); + if ($ip=="") {$ip=$remoteip;} + $autoupdate=getFormValue('autoupdate',0); + $subdomain = getFormValue('domain',null); + + // open log session + openlog("DDNS-Provider", LOG_PID | LOG_PERROR, LOG_LOCAL0); + + // check for given domain + if (is_null($subdomain)) { + // No Domain; display form +?> + + + +
+