Unify "serverside highscores" - reading in a webpage

Hello all.

I got the unify script for serverside high scores working on my android game, and it will post and get scores from the editor or from the devices without problems.

See here: http://www.unifycommunity.com/wiki/index.php?title=Server_Side_Highscores

The thing I need to do/learn is, how can I setup my webpage to have a table showing these high scores from the MySQL database?

You know something like:

top scores:
 1. billy 55,000
 2. johnny 45,000
 3. frank 30,000
 4. wallace 1,000

all of that, inside my webpage, so I guess what I need is some HTML/PHP help, in getting the information out of the MySQL database, and making it a readable form in a web browser somehow.

Now I looked into creating a web page with data from MySQL pages, but everything gets so complicated for most peoples databases! Being that my database only holds a name and a score pretty much, the complex tuts I find online dont really apply to me, and are just too far outside of my PHP knowledge in general (why didnt they just make the internet all C# haha). I need something really more geared for us unity people, and that specific serverside high scores MySQL setup…

UPDATE:
Okay, I have the answer for those looking to get your high scores onto your webpage(assuming you set them up exactly like the unify community instructs you)…see answer below

What you will need to do is this:

  1. Open a blank notepad or similar.
  2. On this notepad, copy the PHP script below.
  3. Change the spots where is says “YourWhatever” to match your database.
  4. For your webpage, in the spot where you want your scores to display, paste this whole thing in, and it will display all the scores in a list, numbered 1 to whatever your lowest score is.

Here is the PHP I used exactly (anywhere saying YourSomething - insert your information for your database there)

<?php
    // Send variables for the MySQL database class.
    $database = mysql_connect('YourDataBaseURL', 'YourUserName', 'YourPasswordHere') or 

die('Could not connect: ' . mysql_error());
    mysql_select_db('YourDatabaseName') or die('Could not select database');

    $query = "SELECT * FROM scores ORDER by `score` DESC";
    $result = mysql_query($query) or die('Query failed: ' . mysql_error());

    $num_results = mysql_num_rows($result);  

    for($i = 0; $i < $num_results; $i++)
    {
	 echo ($i + 1)." ";
         $row = mysql_fetch_array($result);
         echo $row['name'] . "	" . $row['score'] . "

";
echo "


";
}
?>

So with this you should have no problems getting started displaying the unify serverside high scores on your web page! good luck!

Hope this saves a few people the effort of having to dig into PHP a little to get this going. Aside from making it skip a line after displaying info, and numbering each result, this is basically the same as how the game would retrieve scores, and its unlimited. I suppose if you had TONS of entries, you might want to limit it to like 100 or so top scores. This could be accomplished I think, by using LIMIT 100 in this line like so:

 $query = "SELECT * FROM scores ORDER by `score` DESC LIMIT 100";