1. What would be the best way to handle things like user accounts? It would need to be accessed from within the applet and from the website
an easy way would be php/mysql wich seems sufficient for a card game and will be pretty simple to setup.
to access your user session from both applet and web page you can add a parameter to your applet tag with the php session id (or other if not php) than use it in your applet HTTP call exemple :
<APPLET
width=640
height=400
code="yourapplet">
<PARAM NAME=SESSION VALUE="<?php echo session_id(); ?>">
</APPLET>
then in the java applet code you read your parameter :
1 2 3 4 5
| String session; public void init() { this.session=getParameter("SESSION"); } |
and you set it as a GET parameter in the url to use the right session server side
1
| URL u=new URL("http://yourserver.com/something.php?SESSION="+this.session); |
and finally in something.php you should have
1 2 3 4 5 6
| <?php session_id($_GET["SESSION"]); session_start(); ... ... ?> |
this is the idea...