/get.php?u=remote url without protocol // if destination url is http based use https:///get.php?ssl=http&u=remote url without protocol // if the destination url is an image file use https:///get.php?**jpg&u=remote url without protocol // Image Type can be changed to jpg, png, gif or any supported image mime type^ $allowCORS = 'https://www.success-trending.club'; $whitelist = array( "www.google.com", "unsplash.com"); function customError($errno, $errstr) { echo "ERRORError: [$errno]

Unknown Protocol


"; die(); } if(empty($_GET['ssl'])){ $u = "https://".$_GET['u']; } elseif (($_GET['ssl']) == 'https') { $u = "https://".$_GET['u']; } elseif (($_GET['ssl']) == 'http') { $u = "http://".$_GET['u']; } else { $u = "https://".$_GET['u']; } $domainaddr = parse_url($u, PHP_URL_HOST); $whitelisted = 0; $count = count($whitelist); for ($i = 0; $i < $count; $i++) { if($domainaddr == $whitelist[$i]) { $whitelisted = 1; break; } } set_error_handler("customError"); if($whitelisted == 1) { $content = file_get_contents($u); header('Access-Control-Allow-Origin: ' . $allowCORS); if(isset($_GET['i'])) { header('Content-Type: image/' . $_GET['i']); } echo $content; } else { header('Content-Type: text/html'); echo ""; echo ""; echo "Another Resource"; echo ""; echo ""; echo "

Access Denied

"; echo "

Hostname: " . $domainaddr . "

"; echo "

URL: " . $u . "

"; echo ""; echo ""; } ?>