Hello,
I am trying to get an image from a remote location. If the image is not there I would like to display a default image. Here is what I have for code:
<?
$displayimage = "http://www.xxx.com/image/".$row['Id'].".jpg\" width=\"142\" height=\"65\>";
if(fopen ($displayimage, "r")) {
//display image
} else {
//display default image
echo "<img src=\"http://www.xxx.com/logo.gif\" border=\"0\" width=\"142\" height=\"65\">";
}
?>
The following error occurs:
Warning: fopen("http://www.xxx.com/image/correctfilename.jpg" width="142" height="65>", "r") - Success in /home/httpd/virtual/htdocs/xxx/xxx.php on line 58
Line 58 happens to be
if(fopen ($displayimage, "r")) {
Can you tell me what I am doing wrong or is this a server side issue?