PDA

View Full Version : PHP Image Resizer



mada9369
01-03-2009, 03:36 AM
I know that there are functions in php that can resize an image for you; but im question, is it possible to give them a custom url.

by a custom url, i mean;

/images/s_6150fe1520c8bfd556c5213448aadc57.gif (small size)
/images/l_6150fe1520c8bfd556c5213448aadc57.gif (large size)

something on the lines of those. ^

different letters in the beginning for all of the different sizes.

any experience? or know if its possible?

maneetpuri
01-03-2009, 10:16 AM
Hi,
You will be using the functions of the GD Libraries of PHP to image resizing, actually when you say that you are resizing an image it means you are creating one and at that point of time instead of just displaying the resized image on the screen you can as well save it and while doing this you can follow whatever convention you want for naming it and saving it in whatever folder you want, thus have a custom URL for each image being generated.

Hope this helps.

Cheers,
~Maneet

npsari
01-04-2009, 10:32 PM
This is what my answer is...
You can give them an URL if you save the image in ur server after resizing it

Otherwise, You can do the folowing...

You simply create a unique ID for each image

Then you create one page which has all the codes

Therefore,

Lets say your site is http://www.example.com
And the page is /user/

So, this link
http://www.example.com/user/?ID=7663
Will open the resized image no. 7663

Obviously, you need to use like mySQL for all that stuff