Re: Problem reading in and displaying an image...
| From: | David Robley | Date: | Wed, 03 Apr 2002 03:31:41 +0000 |
| Subject: | Re: Problem reading in and displaying an image... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91256@lists.php.net to get a copy of this message | ||
In article <NFBBLNJBKLPPMKEJAKCOGEEAEIAA.cday@atpco.com>, cday@atpco.com
says...
> I'm trying to read in a 1x1 pixel file and display it, basically to assist
> in setting 3rd party cookies (our other affiliated sites that don't follow
> under the same domain.. it's really sloppily set up, but thats another
> story).. The problem I have is the script is just hanging, sits there and
> does nothing, constantly trying to load..
>
>
> setcookie("$cookieName", $u, $expire, "/");
> setcookie("$cookieName"."logon", $t, $expire, "/");
>
> $fd =
> fopen("http://www.armytimes.com/images/spacer.gif",
> "r");
> $image = fread($fd, 5024);
> fclose($fd);
> Header("Content-type: image/gif");
> echo $image;
>
> exit();
>
>
> now, if I comment out the Header and echo $image; lines, the script works
> fine, it reads in the file with no problem it seems. But when I turn those
> 2 lines back on, it totally hangs. does anyone have any ideas? I am
> totally stumped.
>
> Thanks,
> Chad
You might try just commenting out the Header line and see if there is any
sort of error message returned. You might also check that your fopen is
successful.
Is there any reason why you couldn't just use
<IMG SRC="www.armytimes.com/images/spacer.gif">?
--
David Robley
Temporary Kiwi!
Quod subigo farinam