Hi,
It's been a while since I've been on here...
I've got a script that takes an image url and resizes it, then outputs it to the screen (using image headers etc).
I've then got a htaccess file that changes my nice url, such as:
'images/thumb/50-70/logo.jpg'
to:
'incudes/resize.php?width=50&height=70&img=logo.jpg'
Which is the resize script, so I can use a nice url in img tags.
The width and height are just the maximum allowed, so sometime the image will be smaller.
Now, this all works correctly, but I am now trying to find out the width and height of the thumbnailed image, from outside of the resize.php script.
I thought that I could use getimagesize, but this doesn't seem to work...
I first tried it using the 'nice' url: '/images/thumb/50-70/logo.jpg'
Thinking that .htaccess would re-direct, but no. I then tried a direct link to the resize file:
'/incudes/resize.php?width=50&height=70&img=logo.jpg'
But that returns a file not found error... Although I can access the file directly.
Trying the direct url without the get variables, however, successfully finds the file, but it doesn't seem to be able to detect the image dimensions.
I just get a blank result..
Is PHP able to recognise htaccess re-directs?
Is PHP able to parse a php file that outputs as an image? (I have all the correct headers etc set!)
Thanks