|
Posted by frizzle on 12/17/56 11:48
darthmincho@gmail.com wrote:
> Hi.
> I want to check if an image exists on a remote server, and if it does,
> show it. I
> If it does not exist I want to show a default message. I have
> previously used these chunks of code but none of them have worked. Any
> Ideas?
>
> ------------------------
> $imgCheck=readfile("http.//www.somesite.com/image.gif");
> if($imgCheck) echo "<img border=0
> src=\"http.//www.somesite.com/image.gif\" width=\"550\" height=\"80\"
> alt=\"banner\">";
> -------------------------
> $fp = @fopen("http.//www.somesite.com/image.gif","r");
> if ($fp) {
> echo '<img border=0 src="http.//www.somesite.com/image.gif" width="550"
> height="80" alt="banner">';
> } else { echo 'Resource not valid'; }
> ------------------------
> Thanks ;o
Dunno if that's it, but in your code you have
HTTP.//
instead of
HTTP://
Frizzle.
Navigation:
[Reply to this message]
|