Go Back   DevHunters.com l Webmaster Forum - Web Advertising - Web Design - SEO Forums > Webmaster / Coding / Web Design Discussion > PHP, CGI, ASP, Server-Side Programming

PHP, CGI, ASP, Server-Side Programming Discuss server-side programming such as PHP, CGI, ASP, and others.

Have A Look At Some Of Our Webmaster Related Sponsors!


Script Directory


Advertise Here


Market Leverage


Free Templates

3D Guide-Characters
3D Guide-characters


Advertise Here

Reply
 
LinkBack Thread Tools Display Modes
Old 07-05-2007, 08:20 AM   #1 (permalink)
Member
 

Join Date: Jul 2007
Posts: 8
iTrader: 0 / 0%
Hunter Bux: 10.00
thestudent is on a distinguished road
Default Display IPAddress

Display IP Address

--------------------------------------------------------------------------------

Small Script

This will display your IP address :

<?
echo "Your IP: $REMOTE_ADDR";
?>
thestudent is offline   Reply With Quote
Old 07-05-2007, 09:53 AM   #2 (permalink)
Field Master
 
karthikeyan's Avatar
 

Join Date: Jun 2007
Posts: 603
iTrader: 0 / 0%
Hunter Bux: 509.00
karthikeyan is on a distinguished road
Send a message via MSN to karthikeyan Send a message via Yahoo to karthikeyan
Default

Quote:
Originally Posted by thestudent View Post
Display IP Address

--------------------------------------------------------------------------------

Small Script

This will display your IP address :

<?
echo "Your IP: $REMOTE_ADDR";
?>
yes this is a common way to display your IP
__________________
My Tech Blog
karthikeyan is offline   Reply With Quote
Old 07-18-2007, 11:23 PM   #3 (permalink)
Field Master
 
suresh's Avatar
 

Join Date: Jun 2007
Posts: 931
iTrader: 2 / 100%
Hunter Bux: 4.00
suresh has a spectacular aura aboutsuresh has a spectacular aura about
Default

yesh this is very small to dsiplay our ips and vistors too
suresh is offline   Reply With Quote
Old 07-28-2007, 04:42 AM   #4 (permalink)
New Hunter
 

Join Date: Jul 2007
Posts: 52
iTrader: 0 / 0%
Hunter Bux: 0
naseerhaider is on a distinguished road
Default

thanks for sharing,this really will help me a great deal.
naseerhaider is offline   Reply With Quote
Old 07-29-2007, 03:17 PM   #5 (permalink)
Senior Member
 

Join Date: Jul 2007
Posts: 285
iTrader: 0 / 0%
Hunter Bux: 0
Arch3r25 is on a distinguished road
Default

Haha, this is an extremely simple script.

The PHP command $REMOTE_ADDR represents the user's IP address.

However, you coded the script wrong; this shouldn't work. You have a string within a string.

This will work:

PHP Code:
<?php
echo "Your IP: ".$REMOTE_ADDR;
?>
Arch3r25 is offline   Reply With Quote
Old 10-17-2007, 08:07 PM   #6 (permalink)
Field Master
 

Join Date: Aug 2007
Posts: 133
iTrader: 0 / 0%
Hunter Bux: 0
rishi_xrich is on a distinguished road
Default

Ya it is very simple to get IP address,Thanks for sharing with us.
__________________
GET REF|MakeDollar| YUWIE|EUBUX|ADCASH|REG AND MAKE MONEY.
rishi_xrich is offline   Reply With Quote
Old 10-18-2007, 07:24 AM   #7 (permalink)
Field Master
 

Join Date: Sep 2007
Posts: 150
iTrader: 0 / 0%
Hunter Bux: 0
kaunas2 is on a distinguished road
Default

lol how?can u show more?
kaunas2 is offline   Reply With Quote
Old 10-18-2007, 09:12 AM   #8 (permalink)
More Than Meets The Eye
 
bizwiz's Avatar
 

Join Date: Jun 2007
Posts: 1,801
iTrader: 0 / 0%
Hunter Bux: 715.00
bizwiz is a name known to allbizwiz is a name known to allbizwiz is a name known to allbizwiz is a name known to allbizwiz is a name known to allbizwiz is a name known to all
Default

Looks like a great tool. I wonder if this will work in our signature links?
bizwiz is offline   Reply With Quote
Old 10-18-2007, 09:40 AM   #9 (permalink)
Field Master
 
Captain Tycoon's Avatar
 

Join Date: Oct 2007
Location: United Kingdom
Posts: 467
iTrader: 0 / 0%
Hunter Bux: 177.00
Captain Tycoon will become famous soon enoughCaptain Tycoon will become famous soon enough
Send a message via MSN to Captain Tycoon
Default

Tehee! This a good tool to scare your visitors from hacking or trying something stupid on you're site :D
Captain Tycoon is offline   Reply With Quote
Old 01-03-2008, 04:19 PM   #10 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

Technically, (I don't mean to hassle this subject) the user can change their IP. If I remember correctly, a user does not just have just one IP adress. It can be changed very easily and nearly impossible to block a user (that may not be the case here. Just an example) I think only the Mac adress stays the same.
SpOrTsDuDe.Reese is offline   Reply With Quote
Old 01-03-2008, 07:07 PM   #11 (permalink)
Sharp Shooter
 
weblord's Avatar
 

Join Date: Mar 2007
Location: Philippines
Posts: 1,324
iTrader: 1 / 100%
Hunter Bux: 611.00
weblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud ofweblord has much to be proud of
Send a message via ICQ to weblord Send a message via AIM to weblord Send a message via MSN to weblord Send a message via Yahoo to weblord Send a message via Skype™ to weblord
Default

good to be placed on top of an order form :)
Quote:
Originally Posted by thestudent View Post
Display IP Address

--------------------------------------------------------------------------------

Small Script

This will display your IP address :

<?
echo "Your IP: ";
?>
weblord is offline   Reply With Quote
Old 01-03-2008, 07:24 PM   #12 (permalink)
Field Master
 
htnho's Avatar
 

Join Date: Dec 2007
Posts: 268
iTrader: 1 / 100%
Hunter Bux: 30.00
htnho is on a distinguished road
Default

Quote:
Originally Posted by SpOrTsDuDe.Reese View Post
Technically, (I don't mean to hassle this subject) the user can change their IP. If I remember correctly, a user does not just have just one IP adress. It can be changed very easily and nearly impossible to block a user (that may not be the case here. Just an example) I think only the Mac adress stays the same.
you can use proxy and the script above will display your proxy ip not your ip.
htnho is offline   Reply With Quote
Old 01-04-2008, 02:12 PM   #13 (permalink)
Senior Moderator
 
SpOrTsDuDe.Reese's Avatar
Default

That's one of the examples how you can get different IP's (I explained wrong) It's nearly impossible to block a user on a website unless you find out their Mac Adress and block that.
SpOrTsDuDe.Reese is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 06:02 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios