Simple PHP URL shortner (without database)

Comments 0

Beware This post is more than 3 years old, it may be outdated or incorrect! Please check elsewhere for accurate information!

It seems that I'm obsessed with making really small and fast PHP scripts, so I made a really simple database-less stand-alone no-config fast URL shortner. It doesn't require mod_rewrite and will work on almost any hosting on the planet.

All you have to do is to create a new file called index.php and put it in a directory and paste the following code in it. It will automatically create a JSON database file and it will also increase the length of the URL if you exceed the maximum number of combinations.


Comments (0)

Please be civil when commenting. Think before writing, don't spam, self promote, bully, harass or harm anyone. Please read the Comment Policy before posting. Comments are moderated.

There are no comments.
Be the first to contribute!

Scroll to top