Is this can exist ?

Discussion in 'JavaScript' started by 1scroll.net, Jun 9, 2008.

  1. #1
    Hi ALL
    I have a request. I have a domain name that I redirect it to another website using a simple code in html, and I am looking for a way to redirect the same page to different websites. for ex: one visitor be sent to a website and others to other website from same page.
    is it possible?


    thanks
     
    1scroll.net, Jun 9, 2008 IP
  2. sharry

    sharry Peon

    Messages:
    319
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can do that randomly if you want like,
    visitor 1 to some random url
    visitor 2 to another random url

    you need to do the following
    1. maintain a table of all urls wher you want users to be redirected
    2. generate a random numbers within the range of number of urls(ie rand() MOD number_of_urls)
    3. use the generated number to index the table and redirect the user to the fetched url

    OR

    You need to maintain a db and enter the most recently visited URL and stuff, by using a database you can make them to be redirected sequentially for example
    visitor 1 => url 1
    visitor 2 => url 2
    visitor n => url n
     
    sharry, Jun 9, 2008 IP
  3. ketunchy

    ketunchy Peon

    Messages:
    59
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,,

    Its a nice idea that you are thinking of redirecting different visitors to different urls. I suggest that it should not be like, the first visitor being redirected to 1st URL and the 2nd to 2nd URL, but rather it should be based on the content the visitor is viewing and also on, what is the content that the visitor is interested in.

    Thanks,,
    Ketunchy.
     
    ketunchy, Jun 9, 2008 IP
  4. 1scroll.net

    1scroll.net Peon

    Messages:
    8
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thank you for the reply .
    not really send 1st visitor to 1 url, 2nd to 2nd url.
    what I mean is to change the link directed to each 5min for ex. something like this.
    I am dump and dumber in programming, is there any script ready for this ?
     
    1scroll.net, Jun 9, 2008 IP
  5. softvision

    softvision Peon

    Messages:
    146
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I think you have to save time in database or in text file and compare stored time to current time. If five minutes have passed then redirect it to other URL.
     
    softvision, Jun 11, 2008 IP