Jump to content

licensetokill

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

licensetokill's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Im looking for a way to let following script or other script check if a domein name is available every for example 5 minutes. Does such script already exist or how to make one. <?php ob_start(); ?> <html> <head> <title>Whois</title> <style> body, td, input { font-family: verdana; font-size: 11px; } form { margin: 0px; } a { color: black; text-decoration: none; } </style> </head> <body> <?php $whois = array(); $whois['be'] = array("whois.dns.be", 43, "{domein}", "FREE"); function whois($whois) { list ($server, $poort, $domein, $vrij) = $whois; $domein = str_replace("{domein}", $_GET['domein'], $domein); $fp = fsockopen($server, $poort); if($fp) { fputs($fp, $domein."\r\n"); while(!feof($fp)) { $data .= fread($fp, 1000); } fclose($fp); } else { $data = "error"; } return $data; } if ($_REQUEST['submit']) { header("location:?domein=".$_POST['domein']); } elseif (!empty($_GET['domein'])) { if (!empty($_GET['ext'])) { echo "<pre>".whois($whois[$_GET['ext']])."</pre>". "<br>". "» <a href=\"?domein=".$_GET['domein']."\">Terug</a>"; } else { echo "<table>". "<tr>". "<td><u>Domeincheck:</u></td>". "<td> </td>". "</tr>"; foreach ($whois as $ext => $value) { list ($server, $poort, $domein, $vrij) = $value; $data = whois($value); if (!ereg($vrij, $data)) { $status = "<a href=\"?domein=".$_GET['domein']."&ext=".$ext."\"><font color=\"red\">bezet</font></a>"; } elseif ($data == "error") { $status = "<font color=\"red\">error</font>"; } else { $status = "<font color=\"darkgreen\">vrij</font>"; } echo "<tr>". "<td>".$_GET['domein'].".".$ext."</td>". "<td align=\"right\">".$status."</td>". "</tr>"; } echo "</table>". "<br>". "» <a href=\"/domeincheck/index.php\">Terug</a>"; } } else { ?> <form method="post"> <table> <tr> <td>Domeinnaam zonder extensie:</td> <td><input type="text" name="domein"></td> </tr> <tr> <td> </td> <td><input type="submit" name="submit" value="Controleer!"></td> </tr> </table> </form> <?php } ?> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.