ASP.NET PHP.NET CODEITWELL MASHABLE OPENSOURCEWEBDESIGN BLOGDUMPS FACEBOOK APPS

Home ASP.NET PHP WINDOW Web Programming Web Logic Web Design css Archives
Thursday, August 20

Get Visitor IP Address in PHP Programming

0 comments

July 28th, 2008 |

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


<span style="color: rgb(0, 0, 0); font-weight: bold;"><?php</span>
<span style="color: rgb(0, 0, 255);">$ip</span>=<span style="color:

rgb(0, 0, 255);">$_SERVER</span><span style="color: rgb(102, 204, 102);">
[</span><span style="color: rgb(255, 0, 0);">'REMOTE_ADDR'<
/span><span style="color: rgb(102, 204, 102);">]</span>;
<a href="http://www.php.net/echo"><span style="color: rgb(0, 0, 102);

">echo</span></a> <span style="color: rgb(0, 0, 255);">$ip<
/span>;
<span style="color: rgb(0, 0, 0); font-weight: bold;">?></span>

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.



Comments
0 comments
Do you have any suggestions? Add your comment. Please don't spam!
Subscribe to post feed

Your comments here...

Some Useful Books

http://books.google.com.np/books?id=Lan3g76cCFYC&lpg=PP1&dq=photoshop%20shortcuts&hl=en&pg=PT1#v=onepage&q=photoshop%20shortcuts&f=false

About Me

SubscribeSubscribe via RSS

SubscribeRecent Posts

SubscribeHot Links

Archive

Live Traffic Feed