PHP Snippets
Name:See Ip
Description: Let the users see their own IP address, useful for other things.
Code below...
>
<?php
//Put the ip in variable called "ip".
$ip = $_SERVER["REMOTE_ADDR"];
//echo the results
echo "Your IP address is $ip";
//This is may not be the accurate way to get the right IP address but most of the time it works.
?>
//Put the ip in variable called "ip".
$ip = $_SERVER["REMOTE_ADDR"];
//echo the results
echo "Your IP address is $ip";
//This is may not be the accurate way to get the right IP address but most of the time it works.
?>