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 265513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:46:31+00:00 2026-05-11T22:46:31+00:00

Say, I have a customers with a integer PK. In my web apps I

  • 0

Say, I have a customers with a integer PK. In my web apps I want to have a profile page for them. I do not want a url like /profile/10375/ (For example, I do not want others to know how many customers I have). I also do not want a slug base url like, /profile/acme_corp/.

What is a good way to convert unique integers to unique random short strings? (For example, earlier Reddit used to have this type of urls, but it was a conversion from decimal to base 36, skipping some ids). But that too is not useful for me as it si easy to guess number of entities in DB with this scheme.

I cant use UUID etc, as they would make the url too large.

  • 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-11T22:46:32+00:00Added an answer on May 11, 2026 at 10:46 pm

    There are some hash algorithms which produce short (8 characters, 0-9a-f) output strings, for example adler32 or crc32. You can generate them using PHP function hash() (see hash_algos() for a list of available algorithms), but I’m not sure your DB engine itself can handle it. If that’s the case, generating random slugs would be a better solution.

    And add salt when hashing, so it’s more secure.

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

Sidebar

Related Questions

We have a system like gift cards balance usage in the checkout page.While customers
Say I have 2 tables: Customers and Orders. A Customer can have many Orders.
Let's say have something like: SELECT energy_produced, energy_consumed, timestamp1 AS timestamp FROM ( SELECT
Say I have an ASMX web service, MyService. The service has a method, MyMethod.
Say I have a class named Frog, it looks like: public class Frog {
I'm not really sure to understand completely the factory pattern. Let's say I have
C# question. Say I have a customers class that has a bunch of props
Let's say you have a basic CRM system, with customers and addresses. Each customer
I have a couple of already existing forms, let's say CUSTOMERS and ORDERS, and
Let say I have a sheet in with columns Customer and CreatedDate with lots

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.