PHP code example of mu / juyuan
1. Go to this page and download the library: Download mu/juyuan 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/ */
mu / juyuan example snippets
use Mu\Juyuan\Request;
# 第一步:声明网关地址
Request::$gateway = 'http://api.douban.com';
# 第二步:按照指定格式请求参数
$params = array(
'action' => 'movie.page',
);
# 第三部:确定请求方式 GET|POST
# GET请求
Request::get($params);
# POST
Request::post($params);