Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2.  
  3. // URL: /javascript.js -- internal redirect with mod_rewrite --> /getfilebysession.php?file=javascript.js
  4. session_start();
  5.  
  6. if (!empty($_SESSION["login"])) { // user logged in
  7.     echo file_get_contents($_GET["file"]);
  8. } else { // otherwise
  9.     http_response_code(403);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement