Skip to content

Instantly share code, notes, and snippets.

@intuxicated
Created October 5, 2012 02:59
Show Gist options
  • Select an option

  • Save intuxicated/3837811 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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