This is a project using CodeIgniter to generate Wechat Gamecenter API Server.
##How to use?
- Download the code to your host (PHP required).
- Edit config files.
- /gamecenter/application/config/config.php
$config['base_url']="http://yourdomain.com"- /gamecenter/application/config/database.php
$db['default']['hostname'] = 'hostname'; $db['default']['username'] = 'username'; $db['default']['password'] = 'password'; $db['default']['database'] = 'gamecenter'; $db['default']['dbdriver'] = 'mysql';- /gamecenter/application/config/weixin_config.php
$config['token'] = 'yourtoken'; // 微信公共平台连接token $config['grant_type'] = 'client_credential'; // grant_type 是获取access_token填写client_credential $config['appid'] = 'appid'; // appid 是第三方用户唯一凭证 $config['secret'] = 'appsecret'; // secret 是第三方用户唯一凭证密钥,即appsecret - Create database.
- Create database if 'gamecenter' is not exist.
- Run http://yourdomain.com/gamecenter/database to create tables.