OP 17 July, 2020 - 05:35 PM
Code:
<html>
<center>
<form action="" method="post">
<input type="text" name="domain">
<br><br>
<input type="submit" name="submit" value="Get IP">
<br>
</form>
</html>
<?php
if (isset($_POST['submit'])){
$url_domain = $_POST['domain'];
$parsed_url = parse_url($url_domain,PHP_URL_HOST);
$domain_ip = gethostbyname($parsed_url);
echo "ip: $domain_ip";
}
?>