Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> jezeli dane IP - przekierowanie strony
S3baso
post
Post #1





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 16.07.2010

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


Witam Serdecznie. Jak zrobic cos takiego ze gdy IP = 91.211.84.58 to przekierowuje strone na np. index.php a gdy kazde inne to zostaje przy tym pliku..


zrobilem tak lecz error:

  1. $ip = $_SERVER['REMOTE_ADDR'];
  2. if ($ip=91.211.84.58){
  3. }
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
matix
post
Post #2





Grupa: Zarejestrowani
Postów: 278
Pomógł: 10
Dołączył: 13.02.2007
Skąd: Rybnik

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


  1. <?php
  2. $ips = array('83.30.125...', '125.125.25.25');
  3.  
  4. if(in_array($_SERVER['REMOTE_ADDR'], $ips))
  5. {
  6. header('Location: index.php');
  7. }
  8. ?>


Ten post edytował matix 19.07.2010, 11:51:44
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: 10.10.2025 - 15:21