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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:11:20+00:00 2026-06-16T06:11:20+00:00

Possible Duplicate: how to shorten the url in a mathematical approach Its a college

  • 0

Possible Duplicate:
how to shorten the url in a mathematical approach

Its a college django project.. where I can’t really setup a database model to store dynamically generated URLs and redirect to short urls based on hashed primary key.. etc

I am thinking in lines of encrypting URL using some algorithm and decrypt on the server. Initially, I thought of using md5 hash but I guess we can’t decrypt.

My actual URL would look like:

http://mydomain.com/photo?friend_name=dennis&me_name=ritchie&ping_url=http%3A%2F%2Fmydomain.com%2Fimg%3Furl%3Dhttps%3A%fsjcsd.googleueusercontent.com%2F-Sf6bP2nOKa8%2FUMaw8vv0QLI%2FAaaddjhnkchkjda7E%2Fs800%2FHosbsco.png%26message%3Dhi+dude

I am thinking it to convert into:

http://mydomain.com?encode=hksfhsfksuhkvbkjnukvns

Then on server side I thinking to convert hksfhsfksuhkvbkjnukvns back to actual string.

Is there any Python Lib I have

  • 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-06-16T06:11:21+00:00Added an answer on June 16, 2026 at 6:11 am

    You can go with url compression + encrypting/base64 approach.

    For compressing you can check python’s zlib or any other lossless compression libraries (lzma, etc), then convert compressed binary string to ascii by base64. For your information, zlib + base64 for your url is worse than the original url.

    But the url may never be as short as you expect, simply because the url content have a lot of information, bad compression ratio, etc. So it’s possible that this solution will never meet the need for applications with text length limit (like twitter).

    So If you wanna a REALLY short url, there must be somewhere to store the short-long pair.

    Keeping those in mind, and I googled for “url shortener” and a lot popped out.

    These are third party web applications just to do this job:

    • http://goo.gl/ from google
    • http://app.x.co/ my first search hit
    • http://www.appappeal.com/apps/url-shortener a massive list of shortener apps
    • goo.gl/zyHmS well, I’m just trying goo.gl out
      …

    Hope you can use a third party app, though.

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

Sidebar

Related Questions

Possible Duplicate: Shorten the URL from example.com/page.php?var=letters to example.com/letters Using htaccess, is it possible
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want
Possible Duplicate: How can I understand nested ?: operators in PHP? Why does this:
Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: I have a nested data structure / JSON, how can I access
Possible Duplicate Why can't I have a non-integral static const member in a class?
Possible Duplicate: Is there some ninja trick to make a variable constant after its
Possible Duplicate: Can you write object oriented code in C? Hi, can someone point
Possible Duplicate: Can you call Directory.GetFiles() with multiple filters? Does it possible to get
Possible Duplicate: How to make unique short URL with Python? I'm looking for a

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.