SHOW:
|
|
- or go back to the newest paste.
| 1 | - | <?php |
| 1 | + | <?php |
| 2 | - | if(substr($_GET['url'],0,60) != 'aHR0cDovL2NhY2hlLnd3dy5nYW1ldHJhY2tlci5jb20vc2VydmVyX2luZm8v') |
| 2 | + | // Check if the url starts with: http://cache.www.gametracker.com/server_info/ |
| 3 | if(substr($_GET['url'],0,60) != 'aHR0cDovL2NhY2hlLnd3dy5nYW1ldHJhY2tlci5jb20vc2VydmVyX2luZm8v') | |
| 4 | {
| |
| 5 | die('not gametracker');
| |
| 6 | } | |
| 7 | ||
| 8 | // Decode Base64 and check file extension to set appropriate header mime. | |
| 9 | // Only jpg, jpeg, png and gif allowed. | |
| 10 | $strFile = base64_decode(@$_GET['url']); | |
| 11 | $strFileExt = end(explode('.' , $strFile));
| |
| 12 | ||
| 13 | if($strFileExt == 'jpg' or $strFileExt == 'jpeg'){
| |
| 14 | header('Content-Type: image/jpeg');
| |
| 15 | }elseif($strFileExt == 'png'){
| |
| 16 | header('Content-Type: image/png');
| |
| 17 | }elseif($strFileExt == 'gif'){
| |
| 18 | header('Content-Type: image/gif');
| |
| 19 | }else{
| |
| 20 | die('not supported');
| |
| 21 | } | |
| 22 | ||
| 23 | // Output GT Banner image | |
| 24 | if($strFile != ''){
| |
| 25 | readfile($strFile); | |
| 26 | } | |
| 27 | exit; | |
| 28 | ?> |