\n "; $result = dns_get_record($dnshost); $ip2 = $result[0][ip]; echo "Gesetzte Dyndns IP: $ip2
\n"; if ($ip == $ip2) { echo "IP ist OK"; } else { echo "IP nicht OK"; $bas=base64_encode($dyndnsben.":".$dyndnspass); socketget("members.dyndns.org","/nic/update?hostname=$dnshost",$bas,""); } function socketget($host, $pfad,$bas) { header("Content-type: text/plain"); $sock = fsockopen($host, 80); fputs($sock, "GET ".$pfad." HTTP/1.1\r\n"); fputs($sock, "Host: ".$host."\r\n"); fputs($sock, "User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13 \r\n"); fputs($sock, "Authorization: Basic ".$bas." \r\n"); fputs($sock, "Connection: close\r\n\r\n"); while(!feof($sock)) $bla .= fgets($sock, 4096); fclose($sock); } //coded by hoohead ?>