Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 11:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP] Domain Checker

Discussion on [PHP] Domain Checker within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
Angellinho's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
[PHP] Domain Checker

It uses the get_headers function to verify the existing headers. Doesn`t matter if it`s or no, if exists menas the domain is registered. If doesn`t exist, the domain is free. Atleast in my vision. =)

PHP Code:
<form action="" method="GET">
                        <label>Domain name (e.g. elitepvpers.com)</label><br /><br />
                        <input type="text" size="30" name="domain" value="<?php echo @$_GET['domain'?>" autofocus />
                        <input type="submit" value="Check" />
                </form>
PHP Code:
<?php
                
if (isset($_GET['domain']) && $_GET['domain'] != '') {
                        
$headers = @get_headers('http://'.$_GET['domain']);
                        
$file = @file_get_contents('http://who.is/whois/'.$_GET['domain'].'/');
                        
$html explode("\n"$file);
                        if (
strlen($headers[0]) > 0) {
                                echo 
'Domain <span style="color:#C00;font-weight:bold">registered</span>.';
                        } else {
                                echo 
'Domain <span style="color:#0C0;font-weight:bold">not registered</span>.';
                                
$file = @file_get_contents('http://who.is/whois/'.$_GET['domain'].'/');
                                if (!
preg_match('/appears to be available/'$file)) {
                                        echo 
'<br />Although who.is says it is.<br />Just check for any HTTP headers. :/';
                                }
                                unset(
$file);
                                unset(
$html);
                        }
                }
        
?>
Angellinho is offline  
Reply


Similar Threads Similar Threads
~ Domain verlosung ~ [.de Domain][1 e*gold][KEINE VERLÄNGERUNGEN]
06/24/2011 - elite*gold Trading - 6 Replies
Hallo erstmal. Mitmachen kostet nur 1 e*gold. Ich werde sicher nicht betrügen. Ihr könnt mich ja (falls) melden. Schickt einfach 1 e*gold an mir um 11:20 fangen wir an. Also die die e*gold geschickt haben. + 500 Megabyte Speicherplatz (erweiterbar) unbegrenzter Traffic eigener FTP-Zugang PHP5 / MySQL-Datenbank CGI-Standardskripte (Gästebuch, Counter, Mailer)
classic pickit,shopbot,nip checker und char script für shop und nip checker bot
08/13/2010 - Diablo 2 - 0 Replies
hi leutz ich selber spiele zwar sogut wie kein diablo mehr, aber ich habe mich nochmal ran gesetzt und eine neuere version von meinem pickit erstellt und noch einige andere sachen enthalten sind in der rar die classic scripts "classic & shopbot" TLNipChecker bot und shopbot selbst und zu guter letzt ein voreingestellter charscript für die sorc OK NUN WOHIN MIT DEM GANZEN ZEUG??? erst eimal entpacken



All times are GMT +1. The time now is 11:12.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.