Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4575438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:03:49+00:00 2026-05-21T20:03:49+00:00

Just as a fun project I wanted to try and make a simple URL

  • 0

Just as a fun project I wanted to try and make a simple URL shortener for my own personal use but I wanted to try and incorporate things that I liked from other shorteners like bit.ly and such. So I’ve come to a snag when it comes to assigning short URL IDs.

Right now I just manually assign the code but I would like to automate it. I could do it the easy way by just assigning incrementing IDs (I thought this could be done using an assigned auto increment value on the MySQL database and just use the PHP dechex() function for the URL) but it seems that other shorteners are random.

I know that I won’t get an absurd number of URLs in the database but I still want to keep the process efficient which makes creating random unique IDs rather taxing with many URLs in the database. I don’t really have any idea about how to go about making a system to make the IDs that doesn’t make duplicates and doesn’t run slowly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T20:03:50+00:00Added an answer on May 21, 2026 at 8:03 pm

    See: PHP short hash like URL-shortening websites and the answer you might want: http://blog.kevburnsjr.com/php-unique-hash

    The second link might be particularly useful, just short-hash the current ID.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a personal, just for fun, project that is using screen scraping to
So, just as a fun project, I decided I'd write my own XML parser.
I want to develop simple Serverless LAN Chat program just for fun. How can
INITIAL NOTE: This is just for a personal tinkering project; I'm not writing enterprise
I'm working on a fun project where I need a simple key/value store that
I'm someone who writes code just for fun and haven't really delved into it
I've been developing a Smalltalk variant for just the fun of it and I
I've read the whole Dragon Book recently (just for fun, I'm not really planning
I'm writing a basic planet viewer OpenGL Perl application, just for fun. I have
We have a handful of developers working on a non-commercial (read: just for fun)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.