Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Adding random numbers/characters to a link

    Hey!

    I'm searching for a way to make tens, hundreds or even thousands of unique links out of one link.
    So what I thought I'd do is add #{randomness} to the end of a link. (eg. http://www.link.com#ds123s)
    So it will make the link address unique but will show the original page.

    I know there are random number/character generator scripts out there but how can I link the original URL into it, so I wouldn't have to manually add the random numbers, letters to the end of the link each time -> it would automatically give me the links with random characters & letters attached.

    Any clues?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,471
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    Are you using a database where you can store the random code AND the actual URL?
    That way, you can match the code to the "real" URL?

    Another idea is that you make it appear random, but it's not.
    Like this.

    K6uG4rTm82
    X62Y4r4080
    e6lM4r7b8P
    96Qw4sWm8Z

    They all contain these common numbers in the same location:
    e6lM4r7b8P

    But using a MySQL database to store the codes and URLs would be the best way.

  • Users who have thanked mlseim for this post:

    Sjem (02-01-2011)

  • #3
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Nice, thanks - I'll post this in the "Small Projects" forums.

  • #4
    Codeasaurus Rex
    Join Date
    Jun 2008
    Location
    Redmond, WA
    Posts
    659
    Thanks
    31
    Thanked 100 Times in 94 Posts
    I've closed this to avoid people from posting here after being linked from Projects.
    Unless otherwise stated, any code posted is most likely untested and may contain syntax errors.
    My posts, comments, code, and suggestions reflect only my personal views.
    Web Portfolio and Code Snippets: http://shanechism.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •