Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <title>Domain Check</title>
- <style>
- * { margin:0 ; padding:0 }
- body { font-family:Arial, Tahoma, Verdana ; font-size:15px ; background-color:#CCC }
- a { color:#888 ; text-decoration:none }
- a:hover { color:#000 }
- #alb { -webkit-border-top-left-radius: 15px;-webkit-border-top-right-radius: 15px;-moz-border-radius-topleft: 15px;-moz-border-radius-topright: 15px;border-top-left-radius: 15px;border-top-right-radius: 15px; }
- </style>
- </head>
- <body>
- <center>
- <h1 style="margin-top:40px;font-family:Georgia, Times New Roman;font-style:italic;font-weight:normal;color:#000;text-shadow: 0 -1px 0 #DDD">Domain Checker</h1>
- <div id="alb" style="background-color:#FFF;width:280px;min-width:280px;margin-top:40px;padding:20px 10px;border-bottom:3px solid #DDD" align="center">
- <div>
- <form action="" method="GET">
- <label>Domain name (e.g. domain.com)</label><br /><br />
- <input type="text" size="30" name="domain" value="<?php echo @$_GET['domain'] ?>" autofocus />
- <input type="submit" value="Check" />
- </form><br />
- </div>
- <div>
- <?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);
- }
- }
- ?>
- </div>
- </div>
- <div>
- <br />
- <p style="font-size:9pt;color:#888">by <a href="http://rstcenter.com/forum/members/gecko/">Gecko</a></p>
- </div>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment