Domain-Test
Source:
<html><head><title>Url-Form-Test</title></head><body>
<h1>Domain-Test</h1>
<?php
if(isset($_GET['url'])
and preg_match('!^(https?://)?(www\.)?([a-z0-9\.-]{3,})\.[a-z]{2,4}(/)?$!i',$_GET['url'])
and gethostbyname($_GET['url']))
{
echo '<a href="'.$_GET['url'].'">'.$_GET['url'].'</a> wurde akzeptiert!';
}
else
{
echo '<form method="get" action="">Webseite:<br>';
echo '<input type="text" name="url" value="http://" title="Url-Eingabe">';
echo '<input type="submit"></form>';
}
echo '<hr><h3>Source:</h3>'.show_source($_SERVER['SCRIPT_FILENAME'],true);
?>
</body></html>