Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by lvictorino · Feb 08, 2013 at 10:20 AM · wwwleaderboardstatistics

Sending logs over the Internet

Hi guys,

I'm working on my very first phone game (not an iOS game by the way) and I want to log players scores in order to have a "sort of" leaderboards at the end of every games.

My first approach was to send game statistics to a PHP page on a private server I own. But as I send it thanks to a _GET method, the statistics are actually visible in the URL.

example:

http://myserver.com/game_logger.php?score=12&color=blue&blah=foo

As you can see it's pretty simple to add statistics to my leaderboards... even without playing. A web brower is enough to add false data.

How do you manage custom (ie: using your own server) leaderboards in your games ? Is there another more secured way that using _GET ?

Thanks,

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Graham-Dunnett · Feb 08, 2013 at 11:05 AM

One way of adding protection is to use an MD5 hash of the values that you are uploading. So in addition to:

 score=12&color=blue&blah=foo

compute

 hash = MD5('score=12&color=blue&blah=foo' + "magic string")

then add this as to the end of the URL as another param. On the server, then compute the hash again, and only accept the score if the computed hash equals the passed hash. This way, only people who know what the magic string is can compute the hash correctly. Note that this approach is not totally secure. (Someone could look at the hash that is passed, and resend the same data as often as they liked. Also, the client contains the magic string, so a hacker could find it in the code.) This is just a straightforward, simple, way of giving you some protection.

A different approach is to use a Number Used Once, or NONCE. In this scenario, the client (ios app) asks the server to send it a unique number. You use that number when uploading a score, so the server knows who you are.

Whatever you decide to do, take a look at this page. Oh, and obviously you can use WWWForm and do a POST.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image lvictorino · Feb 08, 2013 at 11:26 AM 0
Share

Thank you Graham. Nice and clear. Do you use this technique yourself ? Do you use another technique to manage leaderboards ?

Thanks again.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity3D WWW takes URL from address bar 1 Answer

Game Center ReportScore & Leaderboard 1 Answer

How to implement leaderboard with social api 1 Answer

Android PlayGamesServices ShowLeaderboardUI stops functioning after hitting Home button 0 Answers

store/rearrange integers for a basic scoreboard with C# 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges