PHP code example of httplib / http

1. Go to this page and download the library: Download httplib/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/ */

    

httplib / http example snippets




use HttpLib\Http;

$this->sendRequest(Http::METHOD_GET, 'http://google.com/');

$this->response(Http::CODE_OK, ['result' => ['any data']]);