Re: Ini files in a webserver
You should use the Get object if you want to make your app communicate with the web server.
A good thing is that you don't have to sign the applet to use this extension. :)
Re: Ini files in a webserver
You cannot directly write files to a webserver. You will have to write some web script (php is often recommended on here) and communicate with that via the "get object".
Re: Ini files in a webserver
It would be a huuuuuuge risk of security if java applets (which run client side) could write to servers!
Re: Ini files in a webserver
Well, my issue is this. I am only allowed 2 mySQL servers on my website for now. I was hoping I could find another method to transfer variables and store them via and to my web server. If a PHP file can still store variables and strings on my webserver (I can save the PHP on my webserver, but could my game edit the contents?)
Assuming I am on track and understanding you correctly, where would I learn how to properly do this WITHOUT mySQL?
Re: Ini files in a webserver
You can use a flat file to store data but I currently I'm not able to upload an example, sorry.
I will do it as soon as possible.
Re: Ini files in a webserver
Re: Ini files in a webserver
I really want to continue with my game, but I am unable until I can find a way to save data to my server where it can be retrieved by more than one person at a time.
Re: Ini files in a webserver
You can do that with a simple PHP file:
PHP Code:
$myFile = "flatFile.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
if($_GET["name"]!="" && $_GET["value"]!="" && $_GET["key"]=="123456")
$stringData = $_GET["name"]."=".$_GET["value"]."\n";
fwrite($fh, $stringData);
fclose($fh);
And you can use the Get object to execute this PHP file:
Code:
http://www.yourwebsite.com/phpFile.php?name=UserName&value=100&key=123456
This will write a name and a value to the flatFile.txt file.
The "key" is only a security feature, it can be made a bit more complex.
You can now retreive the flatFile.txt with the Get object.
That's for now. Sorry, currently I don't have enough time to write more!
Good luck!
Re: Ini files in a webserver
Will people be able to edit the contents of that file without my program? I would like some way to protect it. For instance, to store passwords and such. Would the php file still work if my text document is in a protected folder that prevents ANYONE but me from writing or getting into it?
Basically, is it safe? I will use it now so I can begin. But I will try my best to learn my PHP so I can properly utilize this system.
By the way,thank you so much for your help. I have had MMF2 for 2 years, but when I first bought it, I had a very small amount of self discipline to create games (I may have had it for more than 2 years. I just know I spelled awesome wrong...).