Joe de Frenky Posted February 28, 2003 Report Share Posted February 28, 2003 Piedodiet par stulbu jautājumu: kāda funkcija ir IP adreses noskaidrošanai? Link to comment Share on other sites More sharing options...
laacz Posted February 28, 2003 Report Share Posted February 28, 2003 Ir predefineets variablis: <code><font color="#000000"> <font color="#0000CC"><? $ip </font><font color="#006600">= </font><font color="#0000CC">$_SERVER</font><font color="#006600">[</font><font color="#CC0000">"REMOTE_ADDR"</font><font color="#006600">]; </font><font color="#0000CC">?></font> </font> </code> Link to comment Share on other sites More sharing options...
Joe de Frenky Posted February 28, 2003 Author Report Share Posted February 28, 2003 Paldies! Link to comment Share on other sites More sharing options...
Venom Posted February 28, 2003 Report Share Posted February 28, 2003 Don't forget HTTP_X_FORWARDED_FOR! Link to comment Share on other sites More sharing options...
jb4 Posted February 28, 2003 Report Share Posted February 28, 2003 Iz PHP manuāļa komentāriem: <code><font color="#000000"> <font color="#0000CC"><? </font><font color="#006600">if (</font><font color="#0000CC">[url=http://lv.php.net/getenv]getenv[/url]</font><font color="#006600">(</font><font color="#CC0000">'HTTP_X_FORWARDED_FOR'</font><font color="#006600">)) { </font><font color="#0000CC">$ip </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/getenv]getenv[/url]</font><font color="#006600">(</font><font color="#CC0000">'HTTP_X_FORWARD_FOR'</font><font color="#006600">); </font><font color="#0000CC">$host </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/gethostbyaddr]gethostbyaddr[/url]</font><font color="#006600">(</font><font color="#0000CC">$ip</font><font color="#006600">); } else { </font><font color="#0000CC">$ip </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/getenv]getenv[/url]</font><font color="#006600">(</font><font color="#CC0000">'REMOTE_ADDR'</font><font color="#006600">); </font><font color="#0000CC">$host </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/gethostbyaddr]gethostbyaddr[/url]</font><font color="#006600">(</font><font color="#0000CC">$ip</font><font color="#006600">); } </font><font color="#0000CC">?></font> </font> </code> Link to comment Share on other sites More sharing options...
Joe de Frenky Posted March 3, 2003 Author Report Share Posted March 3, 2003 Ko nozīmē: HTTP_X_FORWARDED_FOR! Link to comment Share on other sites More sharing options...
Kaklz Posted March 4, 2003 Report Share Posted March 4, 2003 Ko nozīmē:HTTP_X_FORWARDED_FOR! ja nemaldos, tad gadiijumos, kad cilveeks lieto Proxy, shitaa var uzzinaat reaalo IP Link to comment Share on other sites More sharing options...
laacz Posted March 6, 2003 Report Share Posted March 6, 2003 Ko nozīmē:HTTP_X_FORWARDED_FOR! Gadījumos, kad cilvēki lien uz āru (pie tava saita) caur proxy serveri, lielākoties publiskie proxy šajā mainīgajā ievieto līdēja patieso IP adresi. Link to comment Share on other sites More sharing options...
Recommended Posts