Jump to content
php.lv forumi

real IP


Klez
 Share

Recommended Posts

vai ir iespējams noteikt datora īsto IP adresi, pat ja konekcija ir caur PROXY serveri?

der variants gan ar PHP, gan ar kādu linux softu. (protams ja tas ir iespējams)

varbūt kaut ko var no apache hederiem dabūt?

Link to comment
Share on other sites

//get IP as: stated IP;proxy forward/behind proxy IP:proxy

$IP=(isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:'').

(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR']!='unknown'?' fwd '.$_SERVER['HTTP_X_FORWARDED_FOR']:'').

(isset($_SERVER['HTTP_CLIENT_IP'])?' client_ip '.$_SERVER['HTTP_CLIENT_IP']:'').

(isset($_SERVER['HTTP_VIA'])?' via '.$_SERVER['HTTP_VIA']:'');

Link to comment
Share on other sites

 Share

×
×
  • Create New...