Skip to content

Instantly share code, notes, and snippets.

@flashwave
Created February 20, 2015 23:02
Show Gist options
  • Save flashwave/5caaa4cfe5989c3f8bd1 to your computer and use it in GitHub Desktop.
Save flashwave/5caaa4cfe5989c3f8bd1 to your computer and use it in GitHub Desktop.
puush leech i mean relay
Options -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !/puush_relay\.php [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/][a-zA-Z0-9./]+)$ puush_relay.php?id=$1 [L]
<?php
/*
* puu.sh relay
* Relays puush shit through this script so you can leech off the Dean Herbert but use your own domain
* Provided to you by the Flashwave
*/
if(isset($_REQUEST['id'])) {
$puush = 'http://puu.sh/'. $_REQUEST['id'];
$mime = get_headers($puush, 1);
header('Content-Type: '. $mime['Content-Type']);
$file = @file_get_contents($puush);
if($file)
print $file;
else
die('The puush could not be found.');
} else {
print 'That puush could not be found.';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment