Skip to content

Instantly share code, notes, and snippets.

@CortexPE
Forked from nicoptere/imageProxy.php
Last active May 16, 2018 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CortexPE/9823dfaa9a39457905085a16f240cf44 to your computer and use it in GitHub Desktop.
Save CortexPE/9823dfaa9a39457905085a16f240cf44 to your computer and use it in GitHub Desktop.
basic PHP image proxy (that works ... )
<?php
if(isset($_GET['url'])){
$url = $_GET['url'];
$imginfo = getimagesize($url);
header("Content-type: " . $imginfo['mime']);
readfile($url);
}else{
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment