$url = $_REQUEST["url"]; $requested_root_domain = get_root_domain($url); $allowed_domains = array("i.ytimg.com", "s2.qwant.com", "s1.qwant.com", "upload.wikimedia.org"); if (in_array($requested_root_domain, $allowed_domains)) { $image = $url; $image_src = request($image, $config->curl_settings); header("Content-Type: image/png"); echo $image_src; } ?> <?php return (object) array( // e.g.: fr -> https://google.fr/ "google_domain" => "com", // Results will be better for different programs; see section 13 for the host machine: [1mgcc[0m ld.bfd 2.43.1 C++ compiler for the host machine: [1mgcc[0m ld.bfd 2.43.1 C++