2022-06-27 17:00:22 -04:00
|
|
|
<?php
|
|
|
|
|
2022-07-08 15:52:26 -04:00
|
|
|
$config = require "config.php";
|
|
|
|
require "misc/tools.php";
|
2022-06-27 17:00:22 -04:00
|
|
|
|
2022-08-28 14:41:33 -04:00
|
|
|
$url = $_REQUEST["url"];
|
2022-07-08 15:52:26 -04:00
|
|
|
|
2022-08-28 14:41:33 -04:00
|
|
|
$split_url = explode("/", $url);
|
|
|
|
$base_url = $split_url[2];
|
2022-09-03 13:45:47 -04:00
|
|
|
|
2022-08-28 14:41:33 -04:00
|
|
|
$base_url_main_split = explode(".", strrev($base_url));
|
|
|
|
$base_url_main = strrev($base_url_main_split[1]) . "." . strrev($base_url_main_split[0]);
|
2022-06-27 17:00:22 -04:00
|
|
|
|
2022-09-16 05:23:57 -03:00
|
|
|
$allowed_domains = array("qwant.com", "wikimedia.org", "brave.com");
|
|
|
|
|
|
|
|
if (in_array($base_url_main, $allowed_domains))
|
2022-08-28 14:41:33 -04:00
|
|
|
{
|
|
|
|
$image = $url;
|
|
|
|
$image_src = request($image);
|
|
|
|
|
|
|
|
header("Content-Type: image/jpeg");
|
|
|
|
echo $image_src;
|
|
|
|
}
|
2022-06-27 17:00:22 -04:00
|
|
|
?>
|