How would you approach this?

Discussion in 'HTML & Website Design' started by Mashiyoshi, Jan 6, 2006.

  1. #1
    I hope all you experts can help me. What would be the simplest and best way to accomplish the following:

    1. Select 1 random visitor to my site per hour.
    2. Redirect the selected visitor to a different page where they will fill out a form.

    How would you code this?
     
    Mashiyoshi, Jan 6, 2006 IP
  2. schlottke

    schlottke Peon

    Messages:
    2,185
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #2
    schlottke, Jan 6, 2006 IP
  3. legend2

    legend2 Well-Known Member

    Messages:
    1,537
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    115
    #3
    if you want this to be per hour, some dynamic languages do not have a timer option. you would need a crontab to run and execute a script.
    better to implement something related to the number of visitors such as every 100 other visitor or so.
     
    legend2, Jan 6, 2006 IP
  4. Mashiyoshi

    Mashiyoshi Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the suggestion. I gave it a try and it doesn't seem to be working properly. Another drawback is that the pop-up blockers will get in the way.

    I do like this idea though. Does anyone out there know of a solution that I can implement?
     
    Mashiyoshi, Jan 10, 2006 IP
  5. dave487

    dave487 Peon

    Messages:
    701
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You could use php/asp to redirect a user if they are the first visitor of a certain hour.

    A database would be needed to register that a user had been redirected for each hour so you have a row for each day with 24 columns and when a visitor arrives at 11.07am on 15th January you check the 11am column in the 15th January row.

    Then you only redirect a user if an entry does not exist in the appropriate hour column for that day.

    You would need to exclude spiders from this though.
     
    dave487, Jan 13, 2006 IP