A lot of possibilities that you have are there.
My first question is to you, how experienced are you with PHP or Perl?
You could set up a database, put a script on your server and use Ajax to send and receive scores.
If you are not that experienced, you can use other services (facebook, clay.io, ...) that you can implement into your game and save scores into.