function check_domain($domain, $server = $this->server, $port = $this->port, $print = 0)
@param string $domain the domain to check
@param string $server the server used for the checking
@param int $port the port needed to reach the server
@param bool $print set to 1 if you want the outputs printed
@return bool returns true if the domain is available, false otherwise
Checks the domain avaiability and, if set, prints the result.
The following code will check for the domain name example.com and, if available, will return the link to the registration through 1and1.com You can change the server used to check domains availability and the site from where buy the domain name by specifing them in the method call.
include_once('dchk.php');
$free = new DCHK();
if($free->check_domain("example.com"))
// domain available
else
// Domain already registered!
Form to check domain names
if (isset($_POST['submit'])) {
$domain = $_POST['domain'];
$ext = $_POST['extension'];
$full_name = $domain . '.' . $ext;
include_once('dchk.php');
$free = new DCHK();
if($free->check_domain("example.com, , , 1")) // Prints the register link also
} else {
?>
}
No changes made since now.
Copyright (C)2007 Giulio Bai
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
A copy of the full license can be found in the official GNU's site
If you found this program useful, share it! Maybe it can help also other people!
Don't be scared, it's free, editable, redistributable.
So... share, Share, SHARE!
If you want to know more about this program, you can contact me at slide.wow@gmail.com.
Wht do you think about this program? Is it useful? How can be improved?