Update webpagetool.php

This commit is contained in:
Namhyeon Go 2019-10-06 02:13:06 +09:00 committed by GitHub
parent cefbd93e1f
commit c413b84ce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -528,6 +528,21 @@ if(!check_function_exists("get_web_xml")) {
}
}
if(!check_function_exists("get_web_cspt")) {
function get_web_cspt($url, $method="get", $data=array(), $proxy="", $ua="", $ct_out=45, $t_out=45) {
$result = false;
$response = get_web_page($url, $method, $data, $proxy, $ua, $ct_out, $t_out);
if($response['size'] > 0) {
if(loadHelper("casplit.format")) {
$result = catsplit_decode($response['content']);
}
}
return $result;
}
}
if(!check_function_exists("get_parsed_json")) {
function get_parsed_json($raw, $options=array()) {
$result = false;
@ -596,7 +611,7 @@ if(!check_function_exists("get_webproxy_url")) {
if(!check_function_exists("get_web_user_agent")) {
function get_web_user_agent($ua="") {
if(empty($ua)) {
$ua = "ReasonableFramework/1.4-dev (https://github.com/gnh1201/reasonableframework)";
$ua = "ReasonableFramework/1.6-dev (https://github.com/gnh1201/reasonableframework)";
} else {
$ua = make_safe_argument($ua);
}