www.webdeveloper.com
Results 1 to 4 of 4

Thread: HTML/Java code help! Very difficult!

  1. #1
    Join Date
    Oct 2009
    Posts
    2

    HTML/Java code help! Very difficult!

    A few questions about the "random html page" code:

    Is there a way I can have percentages/odds/chances for each random page to be displayed?

    And, once someone is displayed any of these pages, is it possible to block their IP address from viewing that page until 24 hours?

    Any help would be very appreciated.

    Thanks,
    Andrew

  2. #2
    Join Date
    Sep 2009
    Posts
    52
    Quote Originally Posted by bugboyandy View Post
    A few questions about the "random html page" code:
    What "random html page" code are you referring to? I'm new here, perhaps I've missed something.

    Quote Originally Posted by bugboyandy View Post
    Is there a way I can have percentages/odds/chances for each random page to be displayed?
    How many pages are there? If you had 10 pages and true randomness, then it stands to reason that over time each page would have a 10% chance of being displayed.

    Quote Originally Posted by bugboyandy View Post
    And, once someone is displayed any of these pages, is it possible to block their IP address from viewing that page until 24 hours?
    Have a look at the HTTP header: REMOTE_ADDR. However this is not reliable, is easily spoofed and is often the address of a proxy server thus potentially blocking other users behind said proxy.

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Thanks for the response and assistance!
    The random page code I am referring to can be viewed and explaination here:
    http://javascript.internet.com/navig...ndom-page.html

  4. #4
    Join Date
    Jun 2005
    Location
    United Kingdom
    Posts
    1,043
    Despite the thread title, this is a Javascript, not a Java coding problem - and nothing to do with HTML, which is what this section of the forum supports. Personally, I have no instant reply, since I don't use Javascript much. I would think you would have a much better chance of a quick answer if you posted your question in the javascript section.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles