PHP code example of yimuyangshu / http-client

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

    

yimuyangshu / http-client example snippets


    $http = new httpClient($url);
	
	$http->set_headers(Arr);
	
	// 设置body参数
    $http->set_body(""); 
	
    $http->set_param(Arr);
	
    $result = $http->post(); // or get();