-
Script kiddie
Is there any way to make Hi-scores using only PHP?
My server doesn't support mySQL, and most of the tutorials for hi-score tables I've seen require it at some stage. Is there any way to make a hi-score table using only PHP? It's not a complete necessity, but I think it would be cool to have in my game: I've heard tales of people going over level 200 on it, and I want to see if these stories are true.
I've spent about half an hour searching the forums and the internet for a PHP-only hi-score table system, but I think it's possible. Then again, I don't know _anything_ about PHP. Can it be done, and, if so, how?
-
If you don't want/can't use a database then you'll need to use the file system.
http://uk2.php.net/manual/en/ref.filesystem.php
Basically..
Vex / G4MES.net - "JBJ Sisters: Snow Adventure" - Now available for Nokia Series 40, 60 and MIDP-2 phones.
-
Et voila!
I used the one at http://www.flashkit.com/tutorials/Ga...-657/index.php for a fair while, I think it uses a file on the server as opposed to a database. If I remember right it seemed a little glitchy at times, but did the job.
-
Belgian member
You can save everything in a textfile
But take a look @ http://www.freesql.org/
-
Script kiddie
Wow. That tutorial was amazing. Sounds like exactly what I need. Thanks to both of you for those great links, although I don't understand the one G4MES posted. PHP scares me.
-
Senior Member
PHP is very simple to use! All variables start with $. This means you can have test like "Hi, my name is $name"; and it will replace the variable $name with the value.
The cool thing is that if you need any info on a function then you just go to php.net and search for it. They have all the functions explained.
-
I'm using a simple perl script to store all data in a text file on the server. I've been using this method for years and it's worked fine. PHP should have no problems.
-
Script kiddie
Well, this little adventure has given me better results than I would've hoped. I eventually uploaded the file, along with a few other PHP things (and a forum, but that was months ago... anyway, it still applies) and none of them worked. The server didn't seem to work with PHP stuff. I went to the website of the host we use, and it said we should be able to use PHP stuff. This purplexed both me and my dad, particularly when we went onto the FAQ section of the website and it contradicted what the other part of the website said.
Then, when my dad wanted to know the actual address for the website (we were using a different domain name to link to it), we were astounded to find out that I'd been uploading all my files to the wrong server for about a year! So, naturally, we ran a couple of tests on the proper server to check if PHP worked on it, and those came out fine. Now we're in the process of moving over all of our files to the bigger, faster, and more PHP-ey server. Life is good.
P.S. znoskieman, you posted after I clicked on the link to reply, but before I actually sent the post... thus meaning that I never ended up noticing your post. Thanks for taking the time to help out anyway.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|