Update webpagetool.php

This commit is contained in:
Namhyeon Go 2018-09-10 02:30:45 +09:00 committed by GitHub
parent 92eb6ecbca
commit a882a21bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,7 +273,7 @@ if(!function_exists("get_web_page")) {
"id" => get_web_identifier($url, $method, $data),
"md5" => get_hashed_text($content, "md5"),
"sha1" => get_hashed_text($content, "sha1"),
"gz_content" => get_hashed_text($gz_content, "base64"),
"gz_content" => $gz_content,
"gz_size" => $gz_content_size,
"gz_md5" => get_hashed_text($gz_content, "md5"),
"gz_sha1" => get_hashed_text($gz_content, "sha1"),
@ -381,7 +381,7 @@ if(!function_exists("get_web_xml")) {
}
}
// 2016-06-01: Adaptive JSON is always quotes without escape non-ascii characters
// 2018-06-01: Adaptive JSON is always quotes without escape non-ascii characters
if(!function_exists("get_adaptive_json")) {
function get_adaptive_json($data) {
$result = "";
@ -398,3 +398,12 @@ if(!function_exists("get_adaptive_json")) {
return $result;
}
}
// 2018-09-10: support webproxy
if(!function_exists("get_webproxy_url")) {
function get_webproxy_url($url, $route="webproxy") {
return get_route_link($route, array(
"url" => $url
));
}
}