View Single Post
  #2  
Old 1st June 2008, 01:10
Leszek Leszek is offline
Senior Member
 
Join Date: Nov 2006
Location: Poland,Włocławek
Posts: 369
Thanks: 22
Thanked 42 Times in 35 Posts
Send a message via Skype™ to Leszek
Default

You could try this:

Code:
<?php 

// checking IP
function IP_prawdziwe(){ 

if ($_SERVER['HTTP_X_FORWARDED_FOR']) { 
    $ip_prawdziwe = $_SERVER['HTTP_X_FORWARDED_FOR']; 
} 
else { 
  $ip_prawdziwe = $_SERVER['REMOTE_ADDR']; 
} 

return $ip_prawdziwe; 
} 

?>
and read the IP:
Code:
<?php 
$ip = IP_prawdziwe(); 
echo IP_prawdziwe(); 
?>
It works but it doesn't always have to depending on the proxy.
Reply With Quote