Skip to content

Instantly share code, notes, and snippets.

@hyusetiawan
Created June 6, 2012 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyusetiawan/2883922 to your computer and use it in GitHub Desktop.
Save hyusetiawan/2883922 to your computer and use it in GitHub Desktop.
Using Blitz with PHP
require_once 'blitz_api.php';
class MyBlitzListener extends BlitzListener {
//will provide the result on the test completed
public function on_complete($result){
echo var_dump($result);
}
//will provide status data as it polls the API
public function on_status($result){
echo var_dump($result);
}
}
//acquire the username and api key from your blitz settings
$blitz_api = new BlitzApi(<username>, <api key>);
$blitz_api->listener = new MyBlitzListener();//extends from blitz_listener
$blitz_api->curl('-r california -p 1-1000:60 http://test.blitz.io');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment