If you're on a win32 server, use "rb" in place of just "r" in your call to fopen. I'm sure this will be irrelevant to 99% of everyone on the planet, but since my forum has both Linux and Windows servers, I made a version that works on both:
PHP Code:
if (! strstr($checkurl, "domain")) {
// what server, Linux or Win32?
$svr = 'lin';
if (!file_exists("/etc/fstab")) { $svr = 'win';}
// Substitute our Logo
header("Content-Type: image/gif");
if ($svr == 'win') {
$readflag = 'rb'; // binary read flag for windows server
$imgfile = "c:\\pathto\\image.jpg";
}
else {
$readflag = 'r'; // standard read flag
$imgfile = "/pathto/image.jpg";
}
$image = fread(fopen($imgfile,$readflag),10000);
echo $image;
fclose($image);
exit;
}