I am using FPDF to create PDFs witch can have images inside. This images can be a file in a drive or a URL. When this url does not exist, I get several errors from FPDF (due to image functions). When image is a file in a drive, I can use file_exists. The problem is when image is a link.
I tried to use CURL to check if URL is valid, but I get this error:
Warning: curl_exec() [function.curl-exec]: Could not call the CURLOPT_HEADERFUNCTION
Is there another way to check if this URL is a valid image? Or to handle image errors, so I can define a default image?
Thanks in advance.