Chad Krause

A small blog about my projects

Chad's URL Shortener Introduction

It's that time again for a new project. What do I want? I'm going to make my own URL Shortener/Redirect service.

Why not use goo.gl? Well what's the fun in that?

The point of this is to learn a little bit more about PHP and Laravel. I already have quite a bit of PHP experience, but this would be my first Laravel. It's practically free for me to make a url shortener, other than a cheap domain name.

Here's my initial plan and expectations:

Creating the URL
  1. Go to my domain name (still pending)
  2. Paste your link into the form
  3. Generate URL
  4. Copy + Paste anywhere
Using a URL
  1. Navigate to the URL
  2. Go to my server
  3. Store user information (IP Address, Time, whatever else I can get)
  4. Redirect user
Backend
  • Store URLs in a database
    • Table for redirects
    • Table for clicks
  • Server code written in PHP/Laravel
  • Aim for a less than 25ms response. This is a number I pulled out of thin air. I have no idea what the realistic expectations are.
  • Store clicks (IP Address, Time)
  • Provide information about shortened URL (how many clicks)

Other cool things that I could add:

  • QR code
  • Batch generators
  • One time use or expire after N clicks





All comments