![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Web Design Forums and discussions on webdesign |
Web Design | |||||||||
|
|
|
|
| |||||
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | 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); } ?> |
|
| | #2 (permalink) |
| Civilians | <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 |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
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 |
![]() | ![]() | ![]() |