A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Is there any way to make Hi-scores using only PHP?

  1. #1
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590

    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?
    http://www.birchlabs.co.uk/
    You know you want to.

  2. #2
    Squizes Bit'ch
    Join Date
    Dec 2003
    Location
    England
    Posts
    70
    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.


  3. #3
    Et voila! twitchymart's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    141
    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.
    Out of practice.

  4. #4
    Belgian member znoskieman's Avatar
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    280
    You can save everything in a textfile

    But take a look @ http://www.freesql.org/
    http://www.leukestart.be

  5. #5
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    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.
    http://www.birchlabs.co.uk/
    You know you want to.

  6. #6
    Senior Member ihoss.com's Avatar
    Join Date
    Oct 2004
    Location
    Norway
    Posts
    581
    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.

  7. #7
    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.

  8. #8
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    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.
    http://www.birchlabs.co.uk/
    You know you want to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center