[help] looking for short url script

Discussion in 'Programming' started by bimasakti, Feb 26, 2009.

  1. #1
    I would like to create some simple short url site as tinyurl.com or vilasta.com, where the visitor can create their own short URL or short url with random subdomain, any suggest for free short url script, it must be easy for editing, installing please! maybe with your own experience..
     
    bimasakti, Feb 26, 2009 IP
  2. jimbo2779

    jimbo2779 Active Member

    Messages:
    105
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #2
    If you know how to use mysql DBs and any web based language you could use the following pseudocode to create your own in an evening no probs:

    Following pseudocode is for when they enter the URL
    
    TAKE USER WEBPAGE
    INSERT INTO DB
    RETRIEVE ID OF OBJECT IN DB
    CONVERT BASE OF ID FROM 10 to 36
    OUTPUT THE SHORT URL ("http://yourdomain.com/CONVERTEDID")
    
    Code (markup):
    The following pseudocode is for the page that redirects the shortened URL to the URL they inputted:
    
    GET CONVERTED ID FROM URL STRING
    CONVERT ID FROM BASE 36 TO 10
    RETRIEVE URL FROM DB THAT CORRESPONDS TO GIVEN ID
    REDIRECT USING PHP OR HTML (or similar)
    
    Code (markup):
    Bearing in mind the above assumes that you have the .htaccess convert the "http://yourdomain.com/CONVERTEDID" to "http://yourdomain.com/get_page.php?id=CONVERTEDID" or similar.

    If this is all greek to you then you may want to start some tutorials, look for a pre-made script or get someone here to knock it up for you. Im sure there are plenty of talented people that could code this in no time for you.
     
    jimbo2779, Feb 27, 2009 IP
  3. bimasakti

    bimasakti Well-Known Member

    Messages:
    121
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    Ok thanks,..
    so far I have use private Short URL/redirect, e.g look at my signature, but I think I would like to make some free Short URL/redirect site
     
    bimasakti, Feb 27, 2009 IP