Get Visitor IP Address

by Shabbir on July 28, 2008

in PHP

This tutorial will be explained in PHP. In some of the next tutorials we will explain how to do this in ASP.Net.

So, this is so easy to do, watch this

<?php
   $ip=$_SERVER['REMOTE_ADDR'];
   echo $ip;
?>

Put this code in some HTML page.

When the user opens that page, the command echo will write its IP address to the page.
That's it.

Share:
  • Digg
  • Facebook
  • StumbleUpon
  • Technorati
  • Twitter
Other Related Posts:
  1. Write To File In C++
  2. Read From File Using StreamReader Class
  3. How to Address Double Email Confirmation of AWeber & vBulletin
  4. Converting Between Timezones With PHP
  5. How do I know if someone is selling my email address?

Want More Tips on How to Make Money Online?
Enter your Name and Email below to subscribe and start 1 month free course now.

Name:
Email:
You would require to confirm your email address before we send you any updates. We respect your privacy as much as you do.
Powered by Aweber
  • Yes wordpress comes with navigation.
  • Wordpress comes with a navigation as to who comments so it is easier to detect spammers.
  • Paul
    You haven't really thought this through have you?

    What about someone coming through a proxy?
blog comments powered by Disqus

Previous post:

Next post:

    About the Author

  • author photo

    My Name is Shabbir Bhimani and I am developer by profession in the field of applications, web and database. Currently doing full time online marketing and like to share my experiences on how you can make money online @ CodeItWell.com. Read more ...


    See how you can get in touch with me.