You are getting me confused
Maybe it is a language issue since I'm not a native
Is this what you want?
Gamer A accesses your homepage on the web hosts server.
Gamer B does this as well and you want communication
to take place between A and B after they have
connected to your server? If communication
starts between them you don't need the server anymore.
If this is what you are looking for you have to
forget about applets. Since applets can only access
resources on the server that has the applet.
There is no way for you to connect the two computers
(A and B) using the applets running on their browsers.
If it is an Application you have written and you want
to tell Gamer A what the IP address of Gamer B is then at least
you need a way to store the IP address of the machines A and B
in order to communicate it to them. You might use a php script
to read and write to a file. But this is dependent on
your provider. Not every webhosting company are allowing
these dangerous actions to take place.
MySQL is a database that is often available
for storing and communicating data.
Applets and PHP output:
The sentence " I was thinking of using PHP as the output
mechanism for the applet and URLconnection for input"
confused me. Since output of an Applet isn't send to the server.
A server has output that can be handle in a client.
My execute() method in the previous message could handle
the output of a PHP script.
Maybe you are trying to create a php script in an Applet and
want to send that to another computer?
If this is the case, I am sorry to tell you that Applets
are CLIENTS and cannot provide content for other Applets.
So in fact it would not be possible to do the following:
Browser on machine A: http://MachineB.com/applet/output.php
You need to run a web server on Machine B to do such a thing
anyway. And your gamers propably don't have webservers running.
So applets can't talk to eachother. Java Applications on the
other hand can connect to systems that you know the IP address of.
See above section for that.
Applets and Servers:
Gamer A and Gamer B connect to web host and web host stores
the moves of the users. It will tell machines A and B what
the other gamer has done. This can be done using an Applet
since the client accesses resources on the same server as
the applet resides on.
Your Subject line refers to sockets and an alternative for them.
A Socket can be seen as a communication channel. Most (cheap)
Web Hosting servers aren't allowing you to run a process/java
to act as a server to communicate with sockets.
If you want to write a PHP script on the server that handles
files than in fact it can be used to do a chat programming with
two applets using the server as their postman. The MySQL
database would be of great help here since you don't have to
worry about security and ISP prevention.
Hope this helps a bit more!
Regards from ME