NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > Webmaster Tutorials
Reload this Page Getting current user's IP address

Webmaster Tutorials Instructional webmaster-related how-to's and tutorials.

Advanced Search
0 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 03-04-2006, 01:38 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
asgsoft's Avatar
Join Date: Sep 2005
Location: At Home
Posts: 881
asgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of light
 



Getting current user's IP address


While looking in the PHP predefined variables i found an intersting one: $_ENV["REMOTE_ADDR"]. what this does is it gives the current IP of the person viewing your site. This is quite good if you are making a poll for a intranet where each user has their own username.
????: NamePros.com http://www.namepros.com/webmaster-tutorials/173494-getting-current-users-ip-address.html

Have a look at this and tell me what you think.

PHP Code:
<?php
$ip 
$_ENV["REMOTE_ADDR"]; //set variable

echo $ip//show the value of the variable

?>
I hope somebody finds it helpful.

ASGSOFT
asgsoft is offline  
Old 03-06-2006, 04:10 AM   #2 (permalink)
Account Suspended
 
JuggernautH's Avatar
Join Date: Dec 2005
Location: ../home/mysite
Posts: 3,565
JuggernautH has much to be proud ofJuggernautH has much to be proud ofJuggernautH has much to be proud ofJuggernautH has much to be proud ofJuggernautH has much to be proud ofJuggernautH has much to be proud ofJuggernautH has much to be proud ofJuggernautH has much to be proud ofJuggernautH has much to be proud ofJuggernautH has much to be proud of
 


Cancer Child Abuse
If you search for it on google you would easily find it, but thnx anyway.
JuggernautH is offline  
Old 03-09-2006, 10:58 AM   #3 (permalink)
BlahBlahBlah...
 
navjotjsingh's Avatar
Join Date: Oct 2005
Location: India
Posts: 1,947
navjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud of
 



Marrow Donor Program
Thanks for the information...I was looking for such a info to be used with a Quiz PHP Script!
navjotjsingh is offline  
Old 03-14-2006, 07:44 AM   #4 (permalink)
NamePros Regular
Join Date: Sep 2005
Location: Canada
Posts: 683
leviathon is on a distinguished road
 



I personally uses JS for that But I guess PHP overcomes it in simplicity
leviathon is offline  
Old 03-15-2006, 03:58 AM   #5 (permalink)
NamePros Member
 
J4m!3's Avatar
Join Date: Oct 2005
Location: Clevedon, UK
Posts: 198
J4m!3 will become famous soon enoughJ4m!3 will become famous soon enough
 



Thanks may come in handy..
J4m!3 is offline  
Old 03-18-2006, 01:11 PM   #6 (permalink)
NamePros Regular
Join Date: Oct 2005
Posts: 205
2knew has a spectacular aura about2knew has a spectacular aura about
 



Slightly different method, same info:
????: NamePros.com http://www.namepros.com/showthread.php?t=173494
Code:
 <?php


   echo "<html><head><title>lifted from www.scanmybrowser.com</title></head>";
   echo "<body><h1>A few request header variables:</h1>";
   echo "HTTP_REFERER=".getenv("HTTP_REFERER")."<br>";
   echo "REMOTE_ADDR=".getenv("REMOTE_ADDR")."<br>";
   echo "HTTP_USER_AGENT=".getenv("HTTP_USER_AGENT")."<br>";
   echo "HTTP_ACCEPT=".getenv("HTTP_ACCEPT")."<br>";
   echo "HTTP_ACCEPT_LANGUAGE=".getenv("HTTP_ACCEPT_LANGUAGE")."<br>";
   echo "HTTP_ACCEPT_CHARSET=".getenv("HTTP_ACCEPT_CHARSET")."<br>";
   echo "HTTP_ACCEPT_ENCODING=".getenv("HTTP_ACCEPT_ENCODING")."<br>";
   echo "</body></html>";

?>
Similar examples in ASP and C++ at www.scanmybrowser.com - look for the links in the left navbar.
2knew is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
77% of Google users.... holeinone Industry News 22 03-07-2006 07:30 AM
Users Online Counter Hosting Script BoxFresh Scripts For Sale 3 08-29-2005 10:41 AM
Php code for getting IP Address of users. bbalegere CODE 2 08-22-2005 04:51 AM
Users Online Hosting - PHP Script *Cheap* Elemental Scripts For Sale 1 02-04-2005 12:21 PM

 
All times are GMT -7. The time now is 12:57 AM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger