Joe de Frenky Posted February 28, 2003 Report Posted February 28, 2003 Piedodiet par stulbu jautājumu: kāda funkcija ir IP adreses noskaidrošanai?
laacz Posted February 28, 2003 Report 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>
jb4 Posted February 28, 2003 Report 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>
Joe de Frenky Posted March 3, 2003 Author Report Posted March 3, 2003 Ko nozīmē: HTTP_X_FORWARDED_FOR!
Kaklz Posted March 4, 2003 Report Posted March 4, 2003 Ko nozīmē:HTTP_X_FORWARDED_FOR! ja nemaldos, tad gadiijumos, kad cilveeks lieto Proxy, shitaa var uzzinaat reaalo IP
laacz Posted March 6, 2003 Report 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.
Recommended Posts