Tonight I got a working copy of Short URL working.
I started working on this script on Sunday evening, and since it was a really long time since I’ve done PHP coding, I struggled my way through the manual and at last got something out to sho.
Basically Short URL is a script that offers the same functionality that Get-Shorty and TinyUrl provides, but which you can host on you own server, so you don’t have to rely on other service providers, and when they go down you don’t go down.
What made me write another script like this ?
Well, my main reason for writing my version of a Short URL script was that I did not want it to be database driven, in other words, no installation hassles. Basically I got mine to work quite well from a file based system using 2 files per URL forward. One file is used for the physical URL and the other is a stats file. Each file will almost always be around 2KB. Thus you are only restricted by the number of files you can store in a folder, and I made a hierarchy of folders which are used, so the limit could be endless.
Performance-wise I have not had any real good test on load , but with the “touch-file” system to check if a forward KEY is in the database works quite fast, and I reckon could be faster than a database connection/authentication/retrieve method.
Basically each key links to a file on the file system, for example http://short.justpulse.com/pulseblog would be represented in a data/P/pulseblog.info and data/P/pulseblog.stats file. So just the fact that the pulseblog.info file is there, means we’ve got the record in our database.
I’m intending to host this as a service on my server, and also improve drastically on the script and functionality.
At this point the script is only in pilot but already functional. URL redirection is working and the stats is also working, although no functionality on the frontend to retrieve the information yet.
And on a last note, I still need to get the Design and Layouts still sorted
good excuse
You can give it a try out here .
Similar Posts:
- None Found
Discussion
No comments yet.