Created
June 6, 2012 19:05
-
-
Save hyusetiawan/2883970 to your computer and use it in GitHub Desktop.
Using Blitz with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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