CODE:<?php
if(isset($_POST['check']) && $_POST['url']) {
$izbaci = array('http://','
www.','http://www.','https://','https://www.');$url = htmlentities($_POST['url']);
$url = str_ireplace($izbaci, '', $url);
$check_dns = checkdnsrr($url);
if($check_dns == 1) {
echo "Domen $url je <font color='red'>zauzet</font>";
} else {
echo "Domen $url je <font color='green'>slobodan</font>";
}
}
?>
<html>
<head>
<title>Domain Checker</title>
<style type='text/css'>
body {
text-align:center;
font-size:36px;
font-weight:bold;
}
</style>
</head>
<body>
<form method='POST'>
Proveri dali je domen zauzet: <input type='text' name='url' /><input type='submit' name='check' value='Proveri' />
</form>
</body>
</html>