Link to home
Start Free TrialLog in
Avatar of yelsherif
yelsherif

asked on

Reading an image from a URL

Hello,
I'm new to PHP and need help to read an image from a site and convert it to .PNG format.
In the first part, I tried the file_get_contents and readfile without success. I receive an error message (The specified CGI application misbehaved by not returning a complete set of HTTP headers.)

Please help
ASKER CERTIFIED SOLUTION
Avatar of Joseph Melnick
Joseph Melnick
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yelsherif
yelsherif

ASKER

Thanks for the suggested code, but how can I know if the GD library is installed on the host server?

Yasser El-Sherif
Hello yelsherif,

To find the modules loaded, as well as other useful information.

<?php
phpinfo();
?>

Joseph Melnick
aaach, the service is not installed on the server and hence I cannot do the task.
anyway the code you provided looks neat and correct, I accept your answer.

Thanks

Yasser
Hello yelsherif,

The GD library can be a bit of a resource hog so it is sometimes not made available.

You might ask your host to include this module.

Joseph Melnick