Just another url shortener http://shikiryu.alwaysdata.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
358 B

  1. <?
  2. /**
  3. *
  4. * Redirecting file
  5. * Take the name in the url and redirect if it's in the DB
  6. */
  7. session_start();
  8. include 'class/ShortURL.php';
  9. $url = new ShortURL();
  10. $name = $_GET['name'];
  11. $_SESSION['msg'] = '';
  12. $ret = $url->findThisUrl($name);
  13. if($ret == null){
  14. header("Location: 404.html");
  15. }else{
  16. header("Location: ".$ret[0]);
  17. }