Location: PHPKode > scripts > gDNS > gdns/gDNS-Docs.html
<html>
<head>
<title>Docs For Class gDNS</title>
<style>
<!--
.php {	padding: 1em;}
*[class="php-src"], *[class="php"], *[class="listing"] {line-height:    0px;}
body{
  color:              #000000;
  background-color:   #ffffff;
  font-family:        tahoma, verdana, arial, sans-serif;
  font-size:          10pt;
  margin:             0;
  padding:            0;
}
a{
  color:              #000099;
  background-color:   transparent;
  text-decoration:    none;
}
a:hover{ text-decoration:    underline;}
a.menu{
  color:              #ffffff;
  background-color:   transparent;
}
td{ font-size:          10pt;}
td.header_top{
  color:              #ffffff;
  background-color:   #9999cc;
  font-size:          16pt;
  font-weight:        bold;
  text-align:         right;
  padding:            10px;
}
td.header_line{
  color:              #ffffff;
  background-color:   #333366;
}
td.header_menu{
  color:              #ffffff;
  background-color:   #666699;
  font-size:          8pt;
  text-align:         right;
  padding:            2px;
  padding-right:      5px;
}
td.menu{
  padding:            2px;
  padding-left:       5px;
}
td.code_border{
  color:              #000000;
  background-color:   #c0c0c0;
}
td.code{
  color:              #000000;
  background-color:   #f0f0f0;
}
td.type{font-style:         italic;}
div.credit{
  font-size:          8pt;
  text-align:         center;
}
div.package{ padding-left:       5px;}
div.tags{  padding-left:       15px;}
div.function{  padding-left:       15px;}
div.top{  font-size:          8pt;}
div.warning{
  color:              #ff0000;
  background-color:   transparent;
}
div.description{  padding-left:       15px;}
hr{
  height:             1px;
  border-style:       solid;
  border-color:       #c0c0c0;
  margin-top:         10px;
  margin-bottom:      10px;
}
span.smalllinenumber{  font-size:          8pt;}
ul {
	margin-left:		0px;
	padding-left:		8px;
}
-->
</style>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">gKodes</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="kamal590.phpclasses.org" class="menu">phpClasses</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              gKodes<br />
            <br /><br />
			<b>Files:</b><br />
      	  <div class="package">
			gDNS.php
		</a><br>
	  </div>
      </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: gDNS</h1>
Source Location: gDNS.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre></pre><br />
<div class="description"></div><br /><br />







</td>

<td valign="top">
<h3><a href="#class_vars">Variables</a></h3>
<ul>
    <li><a href="../gKodes/gDNS.html#var$cur_domain">$cur_domain</a></li>
    <li><a href="../gKodes/gDNS.html#var$t_log">$t_log</a></li>
  </ul>
</td>


<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../gKodes/gDNS.html#methodgDNS">gDNS</a></li>
    <li><a href="../gKodes/gDNS.html#methodclearRecords">clearRecords</a></li>
    <li><a href="../gKodes/gDNS.html#methodgetRecords">getRecords</a></li>
    <li><a href="../gKodes/gDNS.html#methodgetResponse">getResponse</a></li>
    <li><a href="../gKodes/gDNS.html#methodisIP">isIP</a></li>
    <li><a href="../gKodes/gDNS.html#methodisValidDomain">isValidDomain</a></li>
    <li><a href="../gKodes/gDNS.html#methodquery">query</a></li>
  </ul>
</td>

</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags"> This class helps getting the DNS information of any site with an  help of a dns server, and re-directs it self to the name server  of the specific web site and gets more information<br />
<br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>lastUpdated:</b>&nbsp;&nbsp;</td><td>Feb,10 2008</td>
  </tr>
  <tr>
    <td><b>filesource:</b>&nbsp;&nbsp;</td><td>gDns.php</td>
  </tr>
  <tr>
    <td><b>example:</b>&nbsp;&nbsp;</td><td>example.php</td>
  </tr>
  <tr>
    <td><b>version:</b>&nbsp;&nbsp;</td><td>0.4</td>
  </tr>
  <tr>
    <td><b>name:</b>&nbsp;&nbsp;</td><td>gDNS</td>
  </tr>
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>G.Kamalakar</td>
  </tr>
</table>
</div>
<br /><br />
<br /><br />
<br /><br />
  <hr />
	<a name="defineGDNS_SORT_OLD"></a>
	<h3>GDNS_SORT_OLD <span class="smalllinenumber">[line 19]</span></h3>
	<div class="tags">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>GDNS_SORT_OLD = 3021</code>
    </td></tr></table>
    </td></tr></table>

    Definations for record output sorting.<br /><br /><p>This defines to generate as the old format of output, which was generated in 0.3</p><br />    <br />
		</div>
	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
  <hr />
	<a name="defineGDNS_SORT_PHP"></a>
	<h3>GDNS_SORT_PHP <span class="smalllinenumber">[line 24]</span></h3>
	<div class="tags">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>GDNS_SORT_PHP = 3022</code>
    </td></tr></table>
    </td></tr></table>

    Definations for record output sorting.<br /><br /><p>This defines to generate similar output as php's dns_get_record.</p><br />    <br />
		</div>
	<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
<br /></div>
<br />
<hr />
<a name="class_vars"></a>
<h3>Class Variables</h3>
<div class="tags">
	<a name="var$cur_domain"></a>
	<p></p>
	<h4>$cur_domain = <span class="value">&nbsp;&quot;&quot;</span></h4>
	<p>[line 88]</p>
  Contains the current processed domain name, Usefull when CNAME is present.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>array</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
	<a name="var$t_log"></a>
	<p></p>
	<h4>$t_log = <span class="value">&nbsp;&quot;&quot;</span></h4>
	<p>[line 50]</p>
  Contains all the log's<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>array</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
</div><br />
	
<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
  <hr />
	<a name="methodgDNS"></a>
	<h3>constructor gDNS <span class="smalllinenumber">[line 112]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../gKodes/gDNS.html">gDNS</a> gDNS(
[boolean
$ipv6 = false], [boolean
$cname = false], [string
$def_dns = ""])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Constructor function for gDNS<br /><br /><p>$ipv6 is a boolean that specfies to use IPv6, if enabled the class would only use IPv6  ip addresses only.  $cname is a boolen specfies , to re-direct if a CNAME is found.  $def_dns is the default DNS server the querys are sent to,  this may be a domain name  or IP address of a DNS server.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">boolean&nbsp;&nbsp;</td>
        <td><b>$ipv6</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">boolean&nbsp;&nbsp;</td>
        <td><b>$cname</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$def_dns</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodclearRecords"></a>
	<h3>method clearRecords <span class="smalllinenumber">[line 653]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void clearRecords(
string
$domain)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Removes the records of the specfied domain.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$domain</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodgetRecords"></a>
	<h3>method getRecords <span class="smalllinenumber">[line 344]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array getRecords(
string
$domain, [int
$sort_id = GDNS_SORT_OLD])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Returns the response records of the specfied domain.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$domain</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">int&nbsp;&nbsp;</td>
        <td><b>$sort_id</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodgetResponse"></a>
	<h3>method getResponse <span class="smalllinenumber">[line 332]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array getResponse(
string
$domain)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Returns the full response with Header, Request and Records (in GDNS_SORT_PHP format) of the  specfied domain.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$domain</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodisIP"></a>
	<h3>method isIP <span class="smalllinenumber">[line 665]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>boolean isIP(
string
$ip, [boolean
$ip6 = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Validates if the given $ip is a valid IPv4 or IPv6 IP address.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$ip</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">boolean&nbsp;&nbsp;</td>
        <td><b>$ip6</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodisValidDomain"></a>
	<h3>method isValidDomain <span class="smalllinenumber">[line 678]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>boolean isValidDomain(
string
$doamin)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Validates if the given $domain is an valid domain.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$doamin</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodquery"></a>
	<h3>method query <span class="smalllinenumber">[line 144]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>boolean query(
string
$domain, [string
$type = "*"], [boolean
$auth = true], [string
$class = "IN"], [string
$server = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Query for an DNS record<br /><br /><p>$domain is the domain name for which you want to get the DNS records for.  $type is the type of DNS records you want for example : NS =&gt; Name Server , MX =&gt; Mail Exchange  $auth is a boolean sepecfing that you want the request for the Authoritative DNS server of  the specfic domain name.  $class is the class in which you what the records for example : IN =&gt; Internet  $server is the dns server you want to use for the current query, this may be a domain name  or IP address of a DNS server.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$domain</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$type</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">boolean&nbsp;&nbsp;</td>
        <td><b>$auth</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$class</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$server</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Wed, 13 Feb 2008 05:16:55 +0000 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>
Return current item: gDNS