chat gpt ile 2 dakikada oluşturduğum daha doğrusu onun oluşturduğu php ile whois sorgulama
index.php dosyası kodları
<!-- HTML kodları -->
<!DOCTYPE html>
<html>
<head>
<title>Whois Bilgisi Sorgulama</title>
<!-- CSS dosyasını bağla -->
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<h1>Whois Bilgisi Sorgulama</h1>
<!-- Form oluştur -->
<form action="whois.php" method="post">
<input type="text" name="domain" placeholder="Domain adını girin...">
<input type="submit" name="submit" value="Sorgula">
</form>
</div>
</body>
</html>style.css dosyası kodları
/* CSS kodları */
.container {
width: 500px;
margin: 0 auto;
text-align: center;
}
h1 {
color: #333;
}
form {
margin-top: 50px;
}
input[type="text"] {
width: 60%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
}
input[type="submit"] {
width: 20%;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}whois.php dosyası kodları
<?php
// Eğer form gönderilmişse
if (isset($_POST['submit'])) {
// Domain adını al
$domain = $_POST['domain'];
// Whois bilgisi sorgulama
$output = file_get_contents("https://www.whois.com/whois/{$domain}");
// Sonuçları ekrana yazdır
echo "<pre>{$output}</pre>";
}
?>
Bunu yaptırmak için nasıl bir işlem yapıyorsunuz paylaşır mısınız?