Re: [PHP] RE: GD Questions: Please help.

2002-06-13 Thread Philip Hallstrom
most definitely... I was assuming $id would be a number which would be looked up in a DB somewhere... in any event the realpath() function is your friend here :) On Thu, 13 Jun 2002, Stuart Dallas wrote: > On Thursday, June 13, 2002 at 10:39:51 PM, you wrote: > > if /path/to/image/cache/$id exis

Re: [PHP] RE: GD Questions: Please help.

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 10:39:51 PM, you wrote: > if /path/to/image/cache/$id exists then >just spit that file back to the browser and exit If you're gonna do this, be sure to check that $id doesn't contain something dangerous such as '../../../../../../../../../../../../../../../etc/pa

[PHP] RE: GD Questions: Please help.

2002-06-13 Thread Philip Hallstrom
What you have below is the usual way to do it... if you want to get a bit fancier you can have your getimage.php script do something like this (pseudo code): --- figure out what image to display via the $id if /path/to/image/cache/$