Last active
December 27, 2023 17:30
-
-
Save nicoptere/a23ffae9ed51a5ca9766 to your computer and use it in GitHub Desktop.
basic PHP image proxy (that works ... )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = ""; | |
if( isset( $_GET['url'] ) ) | |
{ | |
$url = $_GET[ 'url' ]; | |
} | |
else | |
{ | |
exit(); | |
} | |
$imginfo = getimagesize( $url ); | |
header("Content-type: ".$imginfo['mime']); | |
readfile( $url ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!
I've made some validations and security checks in this version: https://gist.github.com/carloscarucce/89329fa61997b3775487b0c155cda41f