Quote:
Originally Posted by Raimund
to check if the file/image exists, replace the following in functions_bbcodeparse.php
Code:
...
$image= ($link);
if (@fclose(@fopen("$image", "r"))) {
$img_width = getimagesize($link);
...
}
Raimund
|

this is nice, but I run into another problem. My member sometime post WRONG images, they post html links as image something like [
img]http://w.w.w/a.html[
/img]
which would give errors:
"Unable to add cookies, header already sent..."
and
"Warning: getimagesize(): stream does not support seeking ..."
how should I check if the link IS image (based on image extension?), before checking if it exist?
should I use
$ext = strrchr(
$image, ".");
or use
exif_imagetype("$image")
or something else?