Merhabalar sevgili THT üyeleri,
Bu konumda PHP ile geliştirmiş olduğum basit bir WHOIS sorgusu kodu vereceğim.
Umarım ilginizi çeker ve işinize yarar, iyi forumlar.
Bu konumda PHP ile geliştirmiş olduğum basit bir WHOIS sorgusu kodu vereceğim.
Umarım ilginizi çeker ve işinize yarar, iyi forumlar.
PHP:
<!DOCTYPE html>
<html>
<head>
<title>WHOIS</title>
<style>
body {
font-family: "Courier New", monospace;
background-color: #000;
color: #0F0;
text-align: center;
}
h1 {
margin-top: 100px;
}
form {
width: 300px;
margin: 20px auto;
}
input[type="text"], input[type="submit"] {
display: block;
margin: 10px auto;
width: 100%;
padding: 5px;
background-color: #000;
color: #0F0;
border: 1px solid #0F0;
box-sizing: border-box;
}
input[type="submit"] {
cursor: pointer;
width: 80px;
margin-top: 5px;
}
textarea {
width: 50%;
height: 500px;
margin: 20px auto;
resize: vertical;
background-color: #000;
color: #0F0;
border: 1px solid #0F0;
padding: 10px;
box-sizing: border-box;
font-family: "Courier New", monospace;
scrollbar-width: thin;
scrollbar-color: #0F0 #000;
}
textarea::-webkit-scrollbar {
width: 10px;
}
textarea::-webkit-scrollbar-thumb {
background-color: #0F0;
}
textarea::-webkit-scrollbar-track {
background-color: #000;
}
</style>
</head>
<body>
<h1>WHOIS</h1>
<form method="post">
<input type="text" name="domain" placeholder="Domain Name">
<input type="submit" value="Search">
</form>
<?php
$domain = $_POST["domain"];
$whois_server = "whois.verisign-grs.com";
$socket = fsockopen($whois_server, 43);
if ($socket) {
fwrite($socket, $domain . "\r\n");
$response = "";
while (!feof($socket)) {
$response .= fgets($socket, 128);
}
fclose($socket);
echo '<textarea>' . htmlspecialchars($response) . '</textarea>';
} else {
echo "WHOIS sunucusuna bağlanırken hata oluştu.";
}
?>
</body>
</html>
Moderatör tarafında düzenlendi: