Display your visitors IP address using php

The following line of code shows your visitors their IP address,

<?php echo $_SERVER['REMOTE_ADDR'] ?>'

For knowing what all super globals are available for you use the function phpinfo(); or print the complete $_SERVER array using print_r($_SERVER);

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

2019 All rights reserved | Powered by WordPress
Back to top
Theme by dynamicguru.com