Printed from BasicTips.com, FREE helpful articles and tips for Webmasters and Business Owners
Copyright © 1994-2006 by BasicTips.com, a division of BasicTemplates.BIZ
All rights reserved. Republication in whole or in part in any form is not permitted.

Sponsored by BasicTemplates.BIZ
Website Templates with External CSS and Removable Graphics
http://www.BasicTemplates.biz

Co-Sponsored by Effective-Website-Secrets.com
Teaching webmasters effective web development and marketing techniques via free podcasts.
http://www.Effective-Website-Secrets.com

Category: Web Design
Displaying a Visitor's IP Number
By BasicTemplates with External CSS



Click Here to View Live Example
If you find a need to display your visitor's IP number on a web page, you will find it a snap to do. It can be done using SSI (server side includes) or PHP. You will need to be sure that your hosting service can support either language. During these days of modern techology most good hosting services can support both programming languages.

SSI

Place the following code in the location of your web page where you want the IP number to appear. Name your page with a .shtml extension.

<!--#echo var="REMOTE_ADDR"-->

PHP

Place the following code in the location of your web page where you want the IP number to appear. Name your page with a .php extension. (Some hosting companies may have a different extension requirement such as a .php3 extension. If it does not work, contact them to find out what extension to use.)

php echo $REMOTE_ADDR;