2022-06-27 23:00:22 +02:00
|
|
|
<?php
|
|
|
|
|
2022-07-08 21:52:26 +02:00
|
|
|
$config = require "config.php";
|
|
|
|
require "misc/tools.php";
|
2022-06-27 23:00:22 +02:00
|
|
|
|
2022-08-28 20:41:33 +02:00
|
|
|
$url = $_REQUEST["url"];
|
2022-07-08 21:52:26 +02:00
|
|
|
|
2022-08-28 20:41:33 +02:00
|
|
|
$split_url = explode("/", $url);
|
|
|
|
$base_url = $split_url[2];
|
2022-09-03 19:45:47 +02:00
|
|
|
|
2022-08-28 20:41:33 +02: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 23:00:22 +02:00
|
|
|
|
2022-09-16 10:23:57 +02:00
|
|
|
$allowed_domains = array("qwant.com", "wikimedia.org", "brave.com");
|
|
|
|
|
|
|
|
if (in_array($base_url_main, $allowed_domains))
|
2022-08-28 20:41:33 +02:00
|
|
|
{
|
|
|
|
$image = $url;
|
|
|
|
$image_src = request($image);
|
|
|
|
|
|
|
|
header("Content-Type: image/jpeg");
|
|
|
|
echo $image_src;
|
|
|
|
}
|
2022-06-27 23:00:22 +02:00
|
|
|
?>
|