Jump to content

Displaying IPs - exposing rogues!


bladechob

Recommended Posts

Hi I'm currently using the script

<?php 
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { 
echo $_SERVER['HTTP_X_FORWARDED_FOR']; 
} else { 
echo $_SERVER['REMOTE_ADDR']; 
} 
?>

to display ip address and any proxy - but it only seems to generate a 'random' ip from somewhere along the server path (I tried it myself using a proxy address and it came up with some German ip!)

 

Is there a definitive way of establishing the genuine visitor IP? I want to deter people using nicked credit card info to purchase my stuff.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/128947-displaying-ips-exposing-rogues/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.