Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if($_GET['username']=='admin'){
  4. @unlink('/tmp/sessionid');
  5. session_destroy();
  6. session_start();
  7. $_SESSION['username']=$_GET['username'];
  8. @$fp = fopen('/tmp/sessionid', 'w');
  9. fwrite($fp,session_id().','.$_SERVER['REMOTE_ADDR']);
  10. fclose($fp);
  11. echo 'recreateok';
  12. }
  13. else {
  14. header('location:index.php');
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement