Results 1 to 4 of 4

Thread: Rotating Websites

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    HondaForums.com
    Posts
    11

    Rotating Websites

    I am looking for a vbscript solution for rotating websites.
    When a visitor comes to my domain www.somewhere.com, I want the first page to automatically forward the visitor to another site. But I want this to rotate to 5 or 6 different sites evenly.
    for example:
    1st visitor comes to www.somewhere.com and is redirected immediately to www.somewherelse.com.
    2nd visitor comes to www.somewhere.com and is redirected immediately to www.anotherurl.com.
    and so forth...
    I don't know much about vb or vbscript or asp but if I can get some script and possible direction I can probably figure it out.

  2. #2
    Frenzied Member seoptimizer2001's Avatar
    Join Date
    Apr 2001
    Location
    Toledo, Ohio USA GMT -5
    Posts
    1,075
    Why don't you just generate a random number between 1 and 5 and that will determine which site to redirect to?

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    HondaForums.com
    Posts
    11
    OK, So how do I do that? I am a beginner and don't have the first clue as to what to do...

  4. #4
    chenko
    Guest
    First you will have to have an ASP host for the page...

    Code:
    <%@ LANGUAGE="VBSCRIPT" %>
    <HTML>
    <BODY>
    <%
    Dim iRndNumber
    iRndNumber = Int(Rnd * 6) + 1 '
    Select Case iRndNumber
        Case 1
            Response.Redirect("http://www.site1.com")
        Case 2
            Response.Redirect("http://www.site2.com")
        Case 3
            Response.Redirect("http://www.site3.com")
        Case 4
            Response.Redirect("http://www.site4.com")
        Case 5
            Response.Redirect("http://www.site5.com")
        Case 6
            Response.Redirect("http://www.site6.com")
    End Select
    %>
    </BODY>
    </HTML>
    that will do it for you.

    si

Posting Permissions

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



Click Here to Expand Forum to Full Width