Update webproxy.php
This commit is contained in:
parent
6171db84cb
commit
b2722ec8fd
|
@ -4,6 +4,7 @@ if(!defined("_DEF_RSF_")) set_error_exit("do not allow access");
|
|||
loadHelper("webpagetool");
|
||||
|
||||
$method = get_requested_value("method");
|
||||
$mime = get_requested_value("mime"); // example: text/html, image/jpeg
|
||||
$url = get_requested_value("url");
|
||||
|
||||
$res_method = "get.cache";
|
||||
|
@ -14,7 +15,10 @@ if(in_array("nocache", $res_methods)) {
|
|||
|
||||
if(!empty($url)) {
|
||||
$response = get_web_page($url, $res_method);
|
||||
echo $response['content'];
|
||||
if(!empty($mime)) {
|
||||
header(sprintf("Content-Type: %s", $mime));
|
||||
}
|
||||
print_r($response['content']);
|
||||
}
|
||||
|
||||
write_common_log(sprintf("%s\t%s\t%s", get_current_datetime(), "webproxy", $url));
|
||||
|
|
Loading…
Reference in New Issue
Block a user