6 Replies Latest reply on Jun 28, 2006 8:56 AM by Kreden

    PHP highscore

    Kreden
      I have been sitting up many nights now, trying to do a PHP highscore list for a game, but with no succes. I am not familiar with PHP so I have been trying out many, many different tutorials, reading a lot of instructions and following them carefully. Nothing works however. Can this be because my server is running in Safe Mode?!?

      If anybody knows a good pre-programmed highscore i would like to know about it.

      Any help will be much appreciated
        • 1. Re: PHP highscore
          jthereliable Level 1
          what is wrong with it? how does the PHP not work? and do you have mySQL with it? Explain a bit more about your problem and how you want the list to work.
          • 2. Re: PHP highscore
            Kreden Level 1
            It seems that the swf file finds the php, but then it never seems to send the data to the highscore list.

            I have mySQL on my server.

            All I really want is an online list of names and scores which I can add to and and view from my Flash game, but as I said I am not familiar with the PHP language, so I've been trying a lot of different readymade codes from different forums.
            • 3. Re: PHP highscore
              jthereliable Level 1
              Ok, answer these:
              1) Did you install apache or some webserver?
              2) Do you have PHP installed with your webserver?
              3) Run 127.0.0.1 in html, does it work?
              4) Did you put the swf+PHP files in the place where 127.0.0.1 goes to?
              5) Are you running the file from IE?
              6) Are you running the file from 127.0.01/[folder]/[html or php]?

              If you said YES to everything, there shouldn't be a problem.


              Reasons for each question:
              1) You need a webserver to run the PHP scripts.
              2) You need PHP installed to run the PHP scripts.
              3) If 127.0.0.1 doesn't work, then the webserver doesn't work.
              NOTE: If you're running the webserver on a port, like 8080, make sure you go on it. 127.0.0.1:8080
              4) If the files aren't there, you can't run it as if it was on the internet.
              5) If you are running it with Standalone Flash Player, it won't load the parsed PHP script, but the PHP script without being parsed.
              6) If you aren't running it as if it was on the internet, (same as #5) it won't be a parsed PHP script.

              Hope this helps you.
              • 4. Re: PHP highscore
                Kreden Level 1
                1) I have a site at b-one.net
                2) b-one.net has a PHP installed, running in Safe Mode, and I have made a php mailing program for my flash site that works pefectly, so the PHP works.
                3) The browser just shows a white page when i write that in the address line
                4) I put them on my site.
                5) I use both Explorer and Firefox to test it.
                6) I run the swf from a html page, and the the swf calls the php.
                • 5. Re: PHP highscore
                  jthereliable Level 1
                  Hmm... I don't get what the problem could be.
                  What do you use to run the script? getURL? loadVars? If you use them, you have to put POST and GET as method to send. If you use loadVars, you have to use sendAndLoad (if you're sending something, if not, just load).

                  Can you post your flash or at least the script where it calls the php? And if possible, post the PHP script.
                  • 6. Re: PHP highscore
                    Kreden Level 1

                    You can find the files in this rar:
                    http://kreden.tripod.com/Highscore.rar

                    and heres a bit of the actionscript

                    _root.scoretable.filename = "scores/highscores.sco";
                    _root.scoretable.scoresize = 10;
                    _root.scoretable.action = "INSERT";
                    _root.scoretable.viewtype = "FLASH";
                    _root.scoretable.winname = name;
                    _root.scoretable.winscore = score;
                    _root.scoretable.loadVariables(" http://kreden.tripod.com/scores.php", "GET");