They did not want to use bitly anymore.
I told them that I had a url shortener sites ones (snurl.eu) and that I could probably could find the script again.
When I found the script and thought about MongoDB… I guess it was time to rewrite it.
So when I had the internet site Snurl.eu I wanted to have my own URL shortener service. I was kinda lazy so I searched for a PHP script that did just wat I wanted.
So I stumbled upon the Script build by Brian Cray. His “Free PHP URL shortener script that kicks ass” as he called it was perfect. Build in 2009.. so a bit old but it did the trick.
Now 6 years later I rebuild it. Why….? well I just love MongoDB. Don’t get me wrong. MySQL is great… but for simple and big ass databases.. with hits-updates…. well you don’t want to use MySQL anymore! You want a NoSQL version!
Since I created the NopNop.nl site with MongoDB and it has shown it’s strength and speed to me, I really wouldn’t know why I would use MySQL for these purposes.
Sorry…. back to the Url Shortener! So…. when my colleagues asked me for this Url Shortener script, I pulled the Brian Cray script and did a little rebuild 🙂
It’s still has these great features (and more!):
- Can shorten over 42 billion unique URLs in 6 or less characters or if you want it can do 12.000.000 in only 4 characters!!!
- It’s even super duper super fast, as it uses MongoDB and uses like almost no server resources
- Yes, it does include an API, for creating short URL’s on the fly!
- Wanna count those visites? Just turn it on!
- Option to limit to one ore more IP addresses for personal use and to prevent spamming!!
- It uses only alphanumeric characters so all browsers can interpret the URL (yes even IE)
- SQL injection hacks?? Ha ha ha it’s Mongo!!!
- Url realness checker! No more 404’s
- Uses 301 redirects for SEO.
- Wanna cache? Not needed with MongoDB, but still an option!
- Wanna use your own short url? Just send it with the Long Url!
Installation is easy!
- Run this from your own (short) domain
Using your personal URL shortener service
I like to thank Brian Cray for his versions.
You can find my script on BitBucket.