1. Go to this page and download the library: Download grithin/phpwebtools 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/ */
grithin / phpwebtools example snippets
use \Grithin\Curl;
$curl = new Curl;
# can set headers either directly using 'options' or through instance attributes
$curl->options['CURLOPT_USERAGENT'] = 'harmless autobot';
$curl->user_agent = 'harmless autobot';
# can provide GET parameters as an array or as a string
$response = $curl->get('http://google.com/?s=bob');
$response = $curl->get('http://google.com/',['s'=>'bob']);
$response = $curl->post('http://google.com/',['s'=>'bob']);
$response = $curl->post('http://google.com/','s=bob');
$response = $curl->post('http://google.com/',json_encode(['bob'=>'s']));