#!/usr/bin/php $value) { switch($param) { case 'u': $username = $value; break; case 'p': $password = $value; break; } } if (!isset($username) || !isset($password)) { echo " check_dyndns_logon.php 1.1 May 13 2013 Logs on to dyn.com and validate that logon was OK. Can be used to keep your free account alive. (Don't execute once a minute... :-)) Requirements: php_curl Usage: check_dyndns_logon.php -u username -p password \n"; exit; } $ch = curl_init(); if($ch) { // Create temporary cookie storage $ckfile = tempnam ("/tmp", "CURLCOOKIE"); // Retrieve logon page to extract multiform code curl_setopt ($ch, CURLOPT_URL, "https://account.dyn.com/entrance/"); curl_setopt ($ch, CURLOPT_TIMEOUT,60); curl_setopt ($ch, CURLOPT_HEADER,0); curl_setopt ($ch, CURLOPT_HTTPGET, 1); curl_setopt ($ch, CURLOPT_COOKIEJAR, $ckfile); curl_setopt ($ch, CURLOPT_VERBOSE, CONST_DEBUG); curl_setopt ($ch, CURLOPT_AUTOREFERER, 1); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); $r = curl_exec ($ch); $filename = "/tmp/check_dyndns_logon_logonpage.html"; if(CONST_DEBUG) { file_put_contents($filename, $r); } if($r!="") { // Extract multiform value from html $searchstr = "