1. Go to this page and download the library: Download lancerhe/php-http library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lancerhe / php-http example snippets
json
{
"ncerhe/php-http": "1.1.0"
}
}
sh
$ php composer.phar install
php
uest = new \LancerHe\Http\Request\Curl();
$HttpRequest->sendRequest("https://www.processon.com/notification/count", array('id' => 12));
var_dump( $HttpRequest->parseResponse() );
// result
// string(24) "{"count":0,"goon":false}"
php
est = new \LancerHe\Http\Request\Curl();
$HttpRequest = new \LancerHe\Http\Request\Decorator\SimpleCrypt($HttpRequest);
$HttpRequest = new \LancerHe\Http\Request\Decorator\LoggerFile($HttpRequest);
$HttpRequest->sendRequest("https://www.processon.com/notification/count", array('id' => 12));
var_dump( $HttpRequest->parseResponse() );
php
se = new \LancerHe\Http\Parse\Sample("header=user&name=lancer");
$HttpParse->parse();
var_dump( $HttpParse->parse() );
// result
// string(23) "header=user&name=lancer"