I had been attempting to write my own random website Applet in java. Although I was able to get it to generate a random quad-four number within the proper range (0.0.0.0. to 223.255.255.255), and to open a blank web page, I never was able to connect to another site. I was thinking that each page had a quad-four number, but as I now understand it, each host has a number. In order to find a site, you not only need a valid IP Address, but also a valid path. While the possible number of IP Addresses is severely limited, the number of textual paths is not. I do not believe that this approach can work.
In order to select a random website, you would have to generate a valid IP Address of a Domain Name Server that allows you access, query it for html files, and then choose one at random. I did not have access to the names of the website directories at my own ISP, Valkyrie, until I had requested my own web page, and received a password-protected directory. Assuming that other ISPs are set up like this, then this approach will not work either.