From 4168f7aff52f6e7cf7320e42252227dac5169c4a Mon Sep 17 00:00:00 2001 From: Horus3 Date: Sun, 16 Nov 2014 21:20:41 +0100 Subject: Initial commit. --- header/index.php | 200 ++++++++++++++++++++++++++++++++++++++++++++++ index.php | 30 +++++++ linkshorter/.gitignore | 4 + linkshorter/db.php | 16 ++++ linkshorter/error.php | 13 +++ linkshorter/functions.php | 58 ++++++++++++++ linkshorter/goto.php | 13 +++ linkshorter/header.php | 18 +++++ linkshorter/index.html | 50 ++++++++++++ linkshorter/index.php | 108 +++++++++++++++++++++++++ linkshorter/insert.php | 36 +++++++++ linkshorter/style.css | 21 +++++ robots.txt | 2 + tools/favicon.ico | Bin 0 -> 5242 bytes tools/footer.php | 9 +++ tools/navbar.php | 27 +++++++ tools/style.css | 54 +++++++++++++ 17 files changed, 659 insertions(+) create mode 100644 header/index.php create mode 100644 index.php create mode 100644 linkshorter/.gitignore create mode 100644 linkshorter/db.php create mode 100644 linkshorter/error.php create mode 100644 linkshorter/functions.php create mode 100644 linkshorter/goto.php create mode 100644 linkshorter/header.php create mode 100644 linkshorter/index.html create mode 100644 linkshorter/index.php create mode 100644 linkshorter/insert.php create mode 100644 linkshorter/style.css create mode 100644 robots.txt create mode 100644 tools/favicon.ico create mode 100644 tools/footer.php create mode 100644 tools/navbar.php create mode 100644 tools/style.css diff --git a/header/index.php b/header/index.php new file mode 100644 index 0000000..1a027ab --- /dev/null +++ b/header/index.php @@ -0,0 +1,200 @@ + + + +
+ + + + + + +Couldn't retrieve URL. Please check whether the website is available and try again."; + } else { + ?> +
Requested URL: "" +Host: ""
Entries are cached for 60 seconds.
+ +Check the response headers for websites.
Enter a URL and hit the submit button.
No connection to the database established.
", "500 Server Failure", false, "No connection to the database established.
", "500 Server Failure", false, "There was a failure and your request can't be proceeded.
", "500 Error", false, "This url wasn't found on this server.
", "404 Not Found", false, "We need a link to be shortened.
", "400 Client Failed", false, "Only schemas like http:// or ftp:// are supported.
", "400 Client Failed", false, "Someone else has already a registered entry under '".htmlentities($short)."'.
", "422 Unprocessable Entity", false, "Your short link for ".htmlentities($_POST["url"])." is
http://".$_SERVER["HTTP_HOST"]."/".$short."
Only schemas like http:// or ftp:// are supported.
", false, "400 Client Failed", "Your short link for ".htmlentities($_POST["url"])." is
http://".$_SERVER["HTTP_HOST"]."/-".$short."