コード例 #1
0
ファイル: example.php プロジェクト: Wowmogs/BattleNetAPI
 * You can set your callback for a global function using a string:
 * BattleNetAPI::setCallback( 'myCallback' );
 *
 * Or you can set your callback for a class method using an array:
 * BattleNetAPI::setCallback( array( 'myClass', 'myCallback' ) );
 *
 * Your callback function whether the request was successful or failed.
 */
BattleNetAPI::setCallback('myCallback');
/**
 * Set your maximum number of simultaneous connections. Keep in mind, the higher
 * the number the more processing and memory usage and the quicker you can
 * reach your request limits resulting in requests with over query limit errors.
 * Default: 5
 */
BattleNetAPI::setMaxConnections(5);
/**
 * Depending on your server configuration, if you are going to be sending many
 * requests and can expect it to take more than 20 seconds or use a lot of
 * memory, you will want to use the BattleNetAPI::noTimeout() function to allow
 * the script to run continuously without any execution time or memory
 * limitations.
 */
//BattleNetAPI::noTimeout();
/**
 * Throttle the number of requests that can be made in a single second. If the
 * number specified below is reached, the server will sleep for one second and
 * reset the counter.
 * 
 * !!!! IT IS NOT RECOMMENDED TO USE THROTTLING IN A PRODUCTION ENVIRONMENT !!!!
 *