<?php

$url = "";

if( isset( $_GET['imgID'] ) )
{
    if($_GET['imgID'] == "1") {
        $url = "https://ipv6.he.net/certification/create_badge.php?pass_name=jonasled&badge=3";
        $mime = "image/png";
    } else if($_GET['imgID'] == "2"){
        $url = "https://www.abuseipdb.com/contributor/45130.svg";
        $mime = "image/svg+xml";
    } else {
        die("wrong image id");
    }
}
else
{
    die("no image ID set");
}

$imginfo = getimagesize( $url );
header("Content-type: ".$mime);
readfile( $url );

?>