Update webproxy.php

This commit is contained in:
Namhyeon Go 2018-09-30 06:15:43 +09:00 committed by GitHub
parent 5ad54ba9ec
commit 67a40284c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,9 +3,18 @@ if(!defined("_DEF_RSF_")) set_error_exit("do not allow access");
loadHelper("webpagetool");
$method = get_requested_value("method");
$url = get_requested_value("url");
$res_method = "get.cache";
$res_methods = explode(".", $method);
if(in_array("nocache", $res_methods)) {
$res_method = "get";
}
if(!empty($url)) {
$response = get_web_page($url, "get.cache");
$response = get_web_page($url, $res_method);
echo $response['content'];
}
write_common_log(sprintf("%s\t%s\t%s", get_current_datetime(), "webproxy", $url));