GB.API Website Install Guide

Easily add scores + achivements to your site with GB.API! The game pulls the data from your site and you can even customize the in game template

Docs

Step 1
Add your site and validate. Soon you can customize the in game theme to match your site. Do this from the control panel.

Step 2
If you use one of our default templates the game will call yoursite.com/gb_api/v1/scores.php and /achievements.php.
If you use a custom template you can call whichever files you please.

The game will save the data to these files and wait for an xml callback to build the high score board or the achievement panel.

Step 3
Now it's time to build our scores.php and achievements.php files. Download the source before continuing. You will have to tweak the following to match your sql database but continue reading for an explanation of the source.

Achievements.php
Scores.php
crossdomain.xml
Create a crossdomain.xml file in your root directory (yoursite.com/crossdomain.xml):
Test
Test any of our games on your site. Use a developer tool to check for errors. Make sure to include the aes-lib.php file included in the source (no need to alter this file).