snowcake-website/ip_info_index.php

8 lines
206 B
PHP
Raw Normal View History

2022-10-31 00:04:09 +00:00
<?php
$client_ip = $_SERVER['REMOTE_ADDR'];
$client_hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo "<p>IP address: <b>$client_ip</b></p>";
echo "<p>Hostname: <b>$client_hostname</b></p>";
?>