Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivaivalous/urlshortener
Old 2012 URL Shortener Project
https://github.com/ivaivalous/urlshortener
Last synced: about 6 hours ago
JSON representation
Old 2012 URL Shortener Project
- Host: GitHub
- URL: https://github.com/ivaivalous/urlshortener
- Owner: ivaivalous
- Created: 2015-04-10T22:57:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-10T23:18:37.000Z (over 9 years ago)
- Last Synced: 2023-02-27T12:37:24.060Z (over 1 year ago)
- Language: PHP
- Homepage: https://tsarstva.bg/sh/url-shortener
- Size: 120 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UrlShortener
Old 2012 URL Shortener ProjectThis repository contains the code of an URL shortener I wrote in 2012, introduced with this blog post: https://tsarstva.bg/sh/url-shortener.
Keeping it here mainly for historical purposes. Thus,
**it's not even implied that this is quality software** [ :) ]To build the application, first execute these SQL queries:
CREATE TABLE `links` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
`link` varchar(255) NOT NULL UNIQUE,
`url` varchar(255) NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;and
CREATE TABLE `visits` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
`vip` varchar(16) DEFAULT NULL,
`referer` varchar(255) DEFAULT NULL,
`agent` varchar(255) DEFAULT NULL,
`lid` int(10) unsigned DEFAULT NULL,
`when` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY `lid` REFERENCES links(`id`)
ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
and then copy and modify the files in the repo to suit your tastes.