PHP code example of monkey92 / httpclient
1. Go to this page and download the library: Download monkey92/httpclient 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/ */
monkey92 / httpclient example snippets
use Monkey92\HttpClient;
$httpUtil = HttpUtil::getInstance();
//get
$get_ret = $httpUtil->doGet('http://www.domain.com/user?id=1');
//post
$post_ret = $httpUtil->doPost('http://www.domain.com/save_user',['name'=>'Tom','age'=>100]);