Go Back   Trackpads Community > General Discussions > Computer and Technology > Web Design

Web Design Forums and discussions on webdesign

Web Design

Reply
 
LinkBack Thread Tools
Old 04-14-2005, 08:00   #1 (permalink)
Civilians

 
Default IP address and proxy - php script

I am currently using getenv(REMOTE_ADDR) to get the IP address. I don't know
much about proxies. Is this script giving a more accurate IP?

<?
if (getenv(HTTP_X_FORWARDED_FOR)) {
$ipaddress = getenv(HTTP_X_FORWARDED_FOR);
} else {
$ipaddress = getenv(REMOTE_ADDR);
}
?>


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 04-14-2005, 16:00   #2 (permalink)
gds@best.cut.here.com
Civilians

 
Default Re: IP address and proxy - php script

<Richard> wrote:
>I am currently using getenv(REMOTE_ADDR) to get the IP address. I don't know
>much about proxies. Is this script giving a more accurate IP?
>
><?
> if (getenv(HTTP_X_FORWARDED_FOR)) {
> $ipaddress = getenv(HTTP_X_FORWARDED_FOR);
> } else {
> $ipaddress = getenv(REMOTE_ADDR);
> }
>?>


As I recall, the X-Forwarded-For header may contain a list of proxies,
some of which may lie within private IP address space. Also, that
header can be easily faked. You need to carefully evaluate how you
are using that information.

--gregbo
gds at best dot com
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
using VBA to get the proxy server Luke Bellamy Web Design 2 10-20-2005 14:03
Vox Proxy looking much better now, thanks Michael West Microsoft Applications 2 06-16-2004 06:38
Vox Proxy dslocum Microsoft Applications 10 06-16-2004 06:34
a proxy server runningDeer Microsoft Applications 2 06-15-2004 14:50
Proxy settings ignored st Web Design 0 06-15-2004 14:17


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 11:13.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.73463 seconds with 19 queries