imagecreatefrompng() and remote files...
Posted: Sat Feb 21, 2009 10:51 pm
Hi,
I'm trying to do something that should be pretty simple... I already have gotten a statement like this to work:
$img = imagecreatefrompng("image.png");
However, I'm having trouble getting a statement like this to work:
$img = imagecreatefrompng("http://somewebsite.com/image.png");
It gives me the message, "Warning: imagecreatefrompng() [function.imagecreatefrompng]: URL file-access is disabled in the server configuration".
According to the PHP documentation, "Windows versions of PHP prior to PHP 4.3.0 do not support access of remote files via this function, even if allow_url_fopen is enabled." But I know I am using PHP5 (I tried "phpversion()"). My only guess is that my webhost (1and1) has disabled this option in their php.ini file. But following their instructions on how to change it did not help.
Anyone have any ideas or suggestions that I could try?
I have also tried using "copy()" to copy remote files, but I get the same error.
I'm trying to do something that should be pretty simple... I already have gotten a statement like this to work:
$img = imagecreatefrompng("image.png");
However, I'm having trouble getting a statement like this to work:
$img = imagecreatefrompng("http://somewebsite.com/image.png");
It gives me the message, "Warning: imagecreatefrompng() [function.imagecreatefrompng]: URL file-access is disabled in the server configuration".
According to the PHP documentation, "Windows versions of PHP prior to PHP 4.3.0 do not support access of remote files via this function, even if allow_url_fopen is enabled." But I know I am using PHP5 (I tried "phpversion()"). My only guess is that my webhost (1and1) has disabled this option in their php.ini file. But following their instructions on how to change it did not help.
Anyone have any ideas or suggestions that I could try?
I have also tried using "copy()" to copy remote files, but I get the same error.