skray

%u041F%u0440%u043E%u0432%u0435%u0440%u043A%u0430 ip %u043F%u043E%u043B%u044C%u0437%u043E%u0432%u0430%u0442%u0435%u043B%u044F %u0432 %u0431%u0430%u0437%u0435

Mar 28th, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. <?
  2.  
  3. $ip="112.222.333.444"; // ip пользователя
  4.  
  5. $baza=array(           // список ip в файле
  6. "110.222.333.444",
  7. "111.222.333.444",
  8. "112.222.333.444",
  9. "113.222.333.444",
  10. "114.222.333.444"
  11. );
  12. $true="";
  13. foreach($baza as $ops)
  14. {
  15.     $true.=$ops==$ip?"Есть в базе":"";
  16. }  
  17. $true=empty($true)?"Нет в базе":$true;
  18.  
  19. echo $true;
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment