5.0-Nano: DtDNS: Difference between revisions
m
Reverted edits by Upazixorys (Talk); changed back to last version by Ric
Upazixorys (talk | contribs) No edit summary |
m (Reverted edits by Upazixorys (Talk); changed back to last version by Ric) |
||
Line 1: | Line 1: | ||
{{Nav 5.0-Nano}} | {{Nav 5.0-Nano}} | ||
'''Uniform Server and DtDNS''' | '''Uniform Server and DtDNS''' | ||
Line 27: | Line 19: | ||
There are two pages to fill in, enter the following details: | There are two pages to fill in, enter the following details: | ||
{| | {| | ||
|& | | ||'''''Page 1'':'''|| | ||
|- | |- | ||
|1)||'''Desired Username'''||This name is used for logging into your '''account''' | |1)||'''Desired Username'''||This name is used for logging into your '''account''' | ||
Line 45: | Line 37: | ||
|8)||'''Two CAPCHA words'''||Enter the two CAPCHA words (if these are difficult to read click the new challenge button) | |8)||'''Two CAPCHA words'''||Enter the two CAPCHA words (if these are difficult to read click the new challenge button) | ||
|- | |- | ||
|& | | ||'''''Page 2'':'''|| | ||
|- | |- | ||
|9)||'''Username'''||Enter your Username as entered in '''1)'''. | |9)||'''Username'''||Enter your Username as entered in '''1)'''. | ||
Line 57: | Line 49: | ||
'''''General information'':''' | '''''General information'':''' | ||
{| | {| | ||
|-valign= | |-valign="top" | ||
| | | | ||
*A DtDNS account is limited to '''five free''' hostnames. | *A DtDNS account is limited to '''five free''' hostnames. | ||
* A hostname is concatenated with a '''domain''' name. | * A hostname is concatenated with a '''domain''' name. | ||
* I have listed available domains on the right. | * I have listed available domains on the right.<br /><br /> | ||
* Your full URL for example | * Your full URL for example | ||
** If you chose '''books''' as hostname | ** If you chose '''books''' as hostname | ||
Line 68: | Line 60: | ||
Will look like this: | Will look like this: | ||
''' | '''<nowiki>http://</nowiki>books.effers.com''' | ||
| | | | ||
& | | ||
| | | | ||
{| | {| | ||
Line 77: | Line 69: | ||
|- | |- | ||
| | | | ||
<pre> | |||
3d-game.com | 3d-game.com | ||
4irc.com | 4irc.com | ||
Line 87: | Line 79: | ||
dtdns.net | dtdns.net | ||
effers.com | effers.com | ||
</pre> | |||
| | | | ||
<pre> | |||
etowns.net | etowns.net | ||
etowns.org | etowns.org | ||
Line 99: | Line 91: | ||
suroot.com | suroot.com | ||
</pre> | |||
|} | |} | ||
|} | |} | ||
Line 106: | Line 98: | ||
After creating a hostname wild cards are enabled by default. This allows you to use a URL such as | After creating a hostname wild cards are enabled by default. This allows you to use a URL such as | ||
<nowiki>http://</nowiki>'''www.'''books.effers.com - Note '''www.''' is the wild card part this can be anything you like for example: | |||
* | * <nowiki>http://</nowiki>www.'''books.effers.com''' | ||
* | * <nowiki>http://</nowiki>www-internation.'''books.effers.com''' | ||
* | * <nowiki>http://</nowiki>local.'''books.effers.com''' | ||
* | * <nowiki>http://</nowiki>www.home.'''books.effers.com''' | ||
'''books.effers.com''' resolves to your IP address you can use the wild card on your server to resolve to different sites. | '''books.effers.com''' resolves to your IP address you can use the wild card on your server to resolve to different sites. | ||
Line 136: | Line 128: | ||
To manage existing hostnames, simply click the entry in the list for example see below. | To manage existing hostnames, simply click the entry in the list for example see below. | ||
{|cellspacing= | {|cellspacing="6" | ||
|- | |- | ||
|'''Hostname'''||'''Domain'''||'''IP Address'''||'''Type''' | |'''Hostname'''||'''Domain'''||'''IP Address'''||'''Type''' | ||
Line 156: | Line 148: | ||
In the user configuration section locate these lines: | In the user configuration section locate these lines: | ||
* $id_pw[] = | * $id_pw[] = "'''books.effers.com''','''fred123'''"; // Change | ||
* $id_pw[] = | * $id_pw[] = "'''books.effers.com''','''fred123'''"; // Change or delete | ||
* $id_pw[] = | * $id_pw[] = "'''books.effers.com''','''fred123'''"; // Change or delete | ||
Substitute '''books.effers.com''' with your real host and domain names, replace the password '''fred123''' with the one you set in step 1) | Substitute '''books.effers.com''' with your real host and domain names, replace the password '''fred123''' with the one you set in step 1) | ||
Line 166: | Line 158: | ||
|- | |- | ||
| | | | ||
<pre> | |||
<?php | |||
/* | /* | ||
############################################################################### | ############################################################################### | ||
Line 180: | Line 172: | ||
chdir(dirname(__FILE__)); // Change wd to this files location | chdir(dirname(__FILE__)); // Change wd to this files location | ||
include_once | include_once "../../unicon/main/includes/config.inc.php"; | ||
include_once | include_once "../../unicon/main/includes/functions.php"; | ||
run_location_tracker(); // Have servers moved if moved update configuration | run_location_tracker(); // Have servers moved if moved update configuration | ||
print | print"\n"; | ||
//######################## User Configuration ################################# | //######################## User Configuration ################################# | ||
// Add as many lines as required with the following format: | // Add as many lines as required with the following format: | ||
// $id_pw[] = | // $id_pw[] = "hostname,password"; | ||
// For example: | // For example: | ||
// $id_pw[] = | // $id_pw[] = "books.effers.com,fred123"; | ||
// $id_pw[] = | // $id_pw[] = "power.dtdns.net,gun22powder"; | ||
//----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||
$id_pw[] = | $id_pw[] = "books.effers.com,fred123"; // Change | ||
$id_pw[] = | $id_pw[] = "books.effers.com,fred123"; // Change or delete | ||
$id_pw[] = | $id_pw[] = "books.effers.com,fred123"; // Change or delete | ||
//###################### END User Configuration ############################### | //###################### END User Configuration ############################### | ||
Line 204: | Line 196: | ||
foreach ($id_pw as $value) { // Iteratate through array | foreach ($id_pw as $value) { // Iteratate through array | ||
$idpw_array = explode( | $idpw_array = explode(",",$value); // Split id pw pairs | ||
if(get_ip_dns($idpw_array[0])){ // Was IP from DNS returned | if(get_ip_dns($idpw_array[0])){ // Was IP from DNS returned | ||
Line 210: | Line 202: | ||
if($test){ // Test code | if($test){ // Test code | ||
print | print "DNS IP = $ip_dns CURRENT IP = $ip_current $idpw_array[0]<br/>\n"; | ||
} | } | ||
Line 250: | Line 242: | ||
// Build complete URL | // Build complete URL | ||
$str= $url. | $str= $url."?id=".$id_val."&pw=".$pw_val."&client=".$client_val; | ||
// Access page using Curl SSL | // Access page using Curl SSL | ||
Line 262: | Line 254: | ||
// Test returned page | // Test returned page | ||
if(preg_match( | if(preg_match("/now\spoints\sto/",$buffer)){// Is returne value "now points to" | ||
return true; // yes: update OK | return true; // yes: update OK | ||
} | } | ||
Line 270: | Line 262: | ||
} | } | ||
//============================================== END DtDNS Host Update Page === | //============================================== END DtDNS Host Update Page === | ||
? | ?> | ||
</pre> | |||
|} | |} | ||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
Line 283: | Line 275: | ||
Contains: | Contains: | ||
<pre> | |||
COLOR B0 | COLOR B0 | ||
@echo off | @echo off | ||
Line 297: | Line 289: | ||
popd | popd | ||
EXIT | EXIT | ||
</pre> | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
=== Cron - Automatic update === | === Cron - Automatic update === | ||
Line 307: | Line 299: | ||
Locate these two line in section '''List of scripts to be run''' | Locate these two line in section '''List of scripts to be run''' | ||
<pre> | |||
// $cmd = 'start ..\..\usr\local\php\php-win.exe ..\..\plugins\dtdns_updater\dtdns_updater.php'; | // $cmd = 'start ..\..\usr\local\php\php-win.exe ..\..\plugins\dtdns_updater\dtdns_updater.php'; | ||
// pclose(popen($cmd,'r')); // Start detatched process | // pclose(popen($cmd,'r')); // Start detatched process | ||
</pre> | |||
and uncomment as shown below | and uncomment as shown below | ||
<pre> | |||
$cmd = 'start ..\..\usr\local\php\php-win.exe ..\..\plugins\dtdns_updater\dtdns_updater.php'; | $cmd = 'start ..\..\usr\local\php\php-win.exe ..\..\plugins\dtdns_updater\dtdns_updater.php'; | ||
pclose(popen($cmd,'r')); // Start detatched process | pclose(popen($cmd,'r')); // Start detatched process | ||
</pre> | |||
'''''Notes'':''' | '''''Notes'':''' | ||
* When the server is first started Cron is run and the IP addreess updated if different | * When the server is first started Cron is run and the IP addreess updated if different |