Project

General

Profile

« Previous | Next » 

Revision d74b5b8b

Added by Scott Ullrich almost 16 years ago

Fix formatting.

View differences:

etc/inc/dyndns.class
377 377
					break;
378 378
				case 'dnsexit':
379 379
					$needsIP = TRUE;
380
                                        curl_setopt($ch, CURLOPT_URL, 'http://www.dnsexit.com/RemoteUpdate.sv?login='.$this->_dnsUser. '&password='.$this->_dnsPass.'&host='.$this->_dnsHost.'&myip='.$this->_dnsIP);
381
                                        $data = curl_exec($ch);
382
                                        if (@curl_error($ch)) log_error("Curl error occurred:" . curl_error($ch));
383
                                        curl_close($ch);
384
                                        $this->_checkStatus($data);
380
					curl_setopt($ch, CURLOPT_URL, 'http://www.dnsexit.com/RemoteUpdate.sv?login='.$this->_dnsUser. '&password='.$this->_dnsPass.'&host='.$this->_dnsHost.'&myip='.$this->_dnsIP);
381
					$data = curl_exec($ch);
382
					if (@curl_error($ch)) log_error("Curl error occurred:" . curl_error($ch));
383
					curl_close($ch);
384
					$this->_checkStatus($data);
385 385
					break;
386 386
				case 'loopia':
387 387
					$needsIP = TRUE;
......
412 412
					$this->_checkStatus($data);
413 413
					break;
414 414

  
415
	            		case 'staticcling':
416
                    			$needsIP = FALSE;
417
                    			curl_setopt($ch, CURLOPT_URL, 'http://www.staticcling.org/update.html?login='.$this->_dnsUser.'&pass='.$this->_dnsPass);
418
                    			$data = curl_exec($ch);
419
                    			if (@curl_error($ch)) log_error("Curl error occured: " . curl_error($ch));
420
                    			curl_close($ch);
421
                    			$this->_checkStatus($data);
422
                    			break;	                    
415
				case 'staticcling':
416
					$needsIP = FALSE;
417
					curl_setopt($ch, CURLOPT_URL, 'http://www.staticcling.org/update.html?login='.$this->_dnsUser.'&pass='.$this->_dnsPass);
418
					$data = curl_exec($ch);
419
					if (@curl_error($ch)) log_error("Curl error occured: " . curl_error($ch));
420
					curl_close($ch);
421
					$this->_checkStatus($data);
422
					break;	                    
423 423
				case 'dnsomatic':
424
				
425 424
					/* Example syntax 
426 425
						https://username:password@updates.dnsomatic.com/nic/update?hostname=yourhostname&myip=ipaddress&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG
427 426
					*/
428
					
429 427
					$needsIP = FALSE;
430 428
					log_error("DNS-O-Matic: DNS update() starting.");
431 429
					if (isset($this->_dnsWildcard) && $this->_dnsWildcard != "OFF") $this->_dnsWildcard = "ON";
......
721 719
						$this->_debug($data);
722 720
					}
723 721
					break;
724
                                case 'staticcling':
725
                                        if (preg_match("/invalid ip/i", $data)) {
726
                                                $status = "phpDynDNS: (Error) Bad Request - The IP provided was invalid.";
727
                                        } else if (preg_match('/required info missing/i', $data)) {
728
                                                $status = "phpDynDNS: (Error) Bad Request - Required parameters were not provided.";
729
                                        } else if (preg_match('/invalid characters/i', $data)) {
730
                                                $status = "phpDynDNS: (Error) Bad Request - Illegal characters in either the username or the password.";
731
                                        } else if (preg_match('/bad password/i', $data)) {
732
                                                $status = "phpDynDNS: (Error) Invalid password.";
733
                                        } else if (preg_match('/account locked/i', $data)) {
734
                                                $status = "phpDynDNS: (Error) This account has been administratively locked.";
735
                                        } else if (preg_match('/update too frequent/i', $data)) {
736
                                                $status = "phpDynDNS: (Error) Updating too frequently.";
737
                                        } else if (preg_match('/DB error/i', $data)) {
738
                                                $status = "phpDynDNS: (Error) Server side error.";
739
                                        } else if (preg_match('/success/i', $data)) {
740
                                                $status = "phpDynDNS: (Success) IP Address Updated Successfully!";
741
                                                $successful_update = true;
742
                                        } else {
743
                                                $status = "phpDynDNS: (Unknown Response)";
744
                                                log_error("phpDynDNS: PAYLOAD: {$data}");
745
                                                $this->_debug($data);
746
                                        }
747
                                        break;
722
                 case 'staticcling':
723
					if (preg_match("/invalid ip/i", $data)) {
724
					        $status = "phpDynDNS: (Error) Bad Request - The IP provided was invalid.";
725
					} else if (preg_match('/required info missing/i', $data)) {
726
					        $status = "phpDynDNS: (Error) Bad Request - Required parameters were not provided.";
727
					} else if (preg_match('/invalid characters/i', $data)) {
728
					        $status = "phpDynDNS: (Error) Bad Request - Illegal characters in either the username or the password.";
729
					} else if (preg_match('/bad password/i', $data)) {
730
					        $status = "phpDynDNS: (Error) Invalid password.";
731
					} else if (preg_match('/account locked/i', $data)) {
732
					        $status = "phpDynDNS: (Error) This account has been administratively locked.";
733
					} else if (preg_match('/update too frequent/i', $data)) {
734
					        $status = "phpDynDNS: (Error) Updating too frequently.";
735
					} else if (preg_match('/DB error/i', $data)) {
736
					        $status = "phpDynDNS: (Error) Server side error.";
737
					} else if (preg_match('/success/i', $data)) {
738
					        $status = "phpDynDNS: (Success) IP Address Updated Successfully!";
739
					        $successful_update = true;
740
					} else {
741
					        $status = "phpDynDNS: (Unknown Response)";
742
					        log_error("phpDynDNS: PAYLOAD: {$data}");
743
					        $this->_debug($data);
744
					}
745
					break;
748 746
			}
749 747
			
750 748
			if($successful_update == true) {

Also available in: Unified diff