Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2.  
  3. $found = true;
  4.  
  5. if ( $_SERVER['REQUEST_URI'] == '/' ) $page = 'landing';
  6. else {
  7. $page = substr($_SERVER['REQUEST_URI'], 1);
  8. $vardu = $page;
  9. if ( !preg_match('/^[A-z0-9/-]{3,16}$/', $page) ) $found = false;
  10. }
  11.  
  12. if ($found) {
  13. if ( file_exists('/'.$page.'.php') ) include '/'.$page.'.php';
  14. else $found = false;
  15. }
  16.  
  17. if (!$found) {
  18. echo '404';
  19. }
  20.  
  21. ?>
  22.  
  23. echo $_SERVER['REMOTE_ADDR'];
  24.  
  25. if ( $_SERVER['REQUEST_URI'] == '/' ) $page = 'landing';
  26. else {
  27. $page = substr($_SERVER['REQUEST_URI'], 1);
  28. $vardu = $page;
  29. if ( !preg_match('/^[A-z0-9/-]{3,16}$/', $page) ) $found = false;
  30. if (твои айпи != $_SERVER['REMOTE_ADDR']) $found = false;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement