i've been trying alsorts but nothing seems to work.
The reason i need it to work and be called like this is because i am using str_replace and replacing '<img src=' with '<img src=resize.php?height=x&width=x&src=' so that it resizes every image with the resized version.
any ideas where i am going wrong or is this just not possible?
It is possible, but on must server's it isn't allowed by default.
In the php.ini file (the php config file) there's a setting that allows the reading of files hosted on a different domain, and thus needed to be accessed via the http protocol. This setting, named allow_url_fopen should be turned On
If that doesn't work, you could open a socket to the url of the file, grab the data that is passed through the socket, treat it as an image and do the resizing of it. It's a lot more complex, but will work on any server (unless the socket functions are disabled, which is the case on most free webhosts)
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks
Why are you still on PHP 4?!?!?! Anything below PHP 5.3 is not officially supported anymore. If you're not on a VPS or private host, ask your provider to update!
Then, take a look at what UnrealEd says:
Quote:
Originally Posted by UnrealEd
It is possible, but on must server's it isn't allowed by default.
In the php.ini file (the php config file) there's a setting that allows the reading of files hosted on a different domain, and thus needed to be accessed via the http protocol. This setting, named allow_url_fopen should be turned On
If this isn't enabled, it won't work.
Try this as well:
Quote:
Originally Posted by UnrealEd
Place this small code snippet at the top of the resize.php page, and see if any error is outputted: