Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> PHP źle pobiera IP
Xayan
post
Post #1





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 18.08.2010

Ostrzeżenie: (0%)
-----


Witam. Mam takowy problem: IP pobierane przez $_SERVER["REMOTE_ADDR"] pokazuje IP serwera, a nie osoby odwiedzającej stronę, a tak nie powinno być (IMG:style_emoticons/default/smile.gif) Cóż z tym można zrobić?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
CuteOne
post
Post #2





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

Ostrzeżenie: (0%)
-----


  1. public function GetIP() {
  2.  
  3. if (getenv("HTTP_CLIENT_IP")) return getenv("HTTP_CLIENT_IP");
  4. elseif(getenv("HTTP_X_FORWARDED_FOR")) return getenv("HTTP_X_FORWARDED_FOR");
  5. elseif(getenv("REMOTE_ADDR")) return getenv("REMOTE_ADDR");
  6. else return "UNKNOWN";
  7. }
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 27.12.2025 - 09:00