Update webpagetool.php

This commit is contained in:
Namhyeon Go 2019-11-12 16:14:27 +09:00 committed by GitHub
parent 7cdc02e817
commit 2731a3589f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -408,17 +408,7 @@ if(!check_function_exists("get_web_page")) {
if(!($content !== false)) { if(!($content !== false)) {
$content = get_web_cmd($url, "jsondata", $data, $proxy, $ua, $ct_out, $t_out, $headers); $content = get_web_cmd($url, "jsondata", $data, $proxy, $ua, $ct_out, $t_out, $headers);
} }
} elseif(in_array("jsonrpc", $res_method)) { } elseif(in_array("jsonrpc", $res_method) || in_array("jsonrpc2", $res_method)) {
$_data = array(
"headers" => array(
"Content-Type" => "application/json-rpc"
),
"data" => array_merge(array(
"jsonrpc" => "1.1"
), $data)
);
$content = get_web_page($url, "jsondata", $_data, $proxy, $ua, $ct_out, $t_out);
} elseif(in_array("jsonrpc2", $res_method)) {
$_data = array( $_data = array(
"headers" => array( "headers" => array(
"Content-Type" => "application/json-rpc" "Content-Type" => "application/json-rpc"