Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
1 result

getImage.php

Blame
  • getImage.php 521 B
    <?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 );
    
    ?>