note 46902 added to function.imagejpeg

From: Date: Wed, 27 Oct 2004 14:35:18 +0000
Subject: note 46902 added to function.imagejpeg
Groups: php.notes 
Request: Send a blank email to php-notes+get-79184@lists.php.net to get a copy of this message
If you are using a script to output an image, consider using it in conjuction with mod_rewrite. It's good for security through obscurity (on-the-fly image generation can be a great exploit for DOS attacks) and it just looks a lot cleaner to the user. Something like the following will allow you to use src="myfile-100-100.jpg" instead of src="displayImage.php?image=myfile&w=100&h=100" RewriteRule ^(.+?)\-(\d+?)\-(\d+?)\.jpg$ displayImage.php?image=$1&w=$2&h=$3 ---- Manual Page -- http://www.php.net/manual/en/function.imagejpeg.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46902 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46902&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46902&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46902&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46902&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46902&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46902&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46902&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79184) next »