PHP code example of opensite / http

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

    

opensite / http example snippets




use opensite\http;

# 设置debug调试配置 及 verify https验证

Http::setDefaultConfig(false,false);

# 设置header 头

Http::setHeaders(array $params);

# GET 请求‚

Http::HTTPRequest('GET',array $params);


# POST 请求‚‚

Http::HTTPRequest('POST',array $params);