Ok Rendelle,
Here I am again after unsuccessful tests. All seems perfect, except that the cookie is not stored. But the connection is ok, if I put "echo" in your cookie.php, I can see the parameter values and good stuff, of course activating that from your SaveGame class.
You did a nice job with your SaveGame class, thank you again. Funny, I have a game on a personal site, and it would be great to use your code over there to store the cookies. Now the cookies are stored performing an input form in PHP, and I am not satisfied with the result.
Just in case you want to play
cards against an applet:
here is my Skip-Bo simulator
I don't have to copy paste my full code here, the SaveGame class is a perfect copy / paste of your code. But I will try to attach following sources:
TestApplet.php - Contains the applet tag to launch AppletToPhp.classAppletToPhp.java - Applet with a button allowing to launch SaveGamecookies.php - Your cookie saver / reader, in which I added some lines
[EDIT] => sorry, I am unable to attach these files, no zip, java, php or txt files are allowed...
I put them here:
http:/www.anisor.ch/PhpApplets.zip (link does not work, copy / paste it if you want to download)
I tried on my localhost php site, I also tried with my www site, I tried with Firefox and with Internet Explorer. I also tried to convert my UTF-8 php files to ISO-8859-1 encoding, just in case the initial
BOM would hurt.
I'm really running short of ideas to solve this problem. Do you think there could be an incorrect setting in PHP (any global variable to set?) or in Firefox preferences? I tried to allow everything in Firefox security, just in case, but no success.
Would someone please test from my website if the applet stores cookies? Here it would be:
- Store a cookie manually:
http://www.anisor.ch/cookies.php?MANUAL_SET&name=anumber&value=128
- Re-read this cookie:
http://www.anisor.ch/cookies.php?MANUAL_GET&name=anumber
- Read all cookies of this site:
http://www.anisor.ch/cookies.php?DEBUG=
Note: I will not let this code for long on the site, maybe one month or so, then I will clean it up and change this post.
Thank you again for any help you could give. Anyways you did already the most important: you told me that what I'm looking for is not impossible!
Have a nice evening and thank you for your attention!
Enrico