Skip to content

Instantly share code, notes, and snippets.

@intuxicated
Created October 5, 2012 02:59
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 intuxicated/3837811 to your computer and use it in GitHub Desktop.
Save intuxicated/3837811 to your computer and use it in GitHub Desktop.
phpthumb htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ /path/to/phpThumb.php?src=../wallpapers/$1&w=200&h=355&aoe=1&q=99&zc=1
</IfModule>
<?php
$image ='url/to/phpThumb.php?src=../wallpapers/$1&w=200&h=355&aoe=1&q=99&zc=1';
$imginfo = getimagesize($image);
header("Content-type: {$imginfo['mime']}");
readfile($image);
@intuxicated
Copy link
Author

$image ='url/to/phpThumb.php?src=../wallpapers/$1&w=200&h=355&aoe=1&q=99&zc=1';
$imginfo = getimagesize($image);
header("Content-type: {$imginfo['mime']}");
readfile($image);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment