website/public/internal/getImage.php

26 lines
521 B
PHP
Raw Normal View History

<?php
$url = "";
if( isset( $_GET['imgID'] ) )
{
if($_GET['imgID'] == "1") {
$url = "https://ipv6.he.net/certification/create_badge.php?pass_name=jonasled&badge=3";
2021-01-02 01:06:17 +01:00
$mime = "image/png";
} else if($_GET['imgID'] == "2"){
$url = "https://www.abuseipdb.com/contributor/45130.svg";
2021-01-02 01:06:17 +01:00
$mime = "image/svg+xml";
} else {
die("wrong image id");
}
}
else
{
die("no image ID set");
}
$imginfo = getimagesize( $url );
2021-01-02 01:06:17 +01:00
header("Content-type: ".$mime);
readfile( $url );
?>