Re: Call a script as an image--Is this right?

From: Date: Fri, 21 Jul 2000 04:12:22 +0000
Subject: Re: Call a script as an image--Is this right?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-7511@lists.php.net to get a copy of this message
John wrote: > > Is this the way it suppose to be? > I tried but it still shows broken image > Thank you again? Nope, not quite there yet ;-). > > <? > include ("user.php"); > > $imgfile="http://mydomain.com/images/1.gif"; $imgfile = "/local/path/on/your/server/to/the/image/file"; Likely something like "/www/images/l.gif". Ciao, Andreas > > header("Content-type: image/$imgtype"); > header("Content-Length: " . filesize($imgfile)); > @readfile($imgfile); > > $handler=@mysql_connect($db_server,$db_username,$db_passwort); > @mysql_select_db($db_database,$handler); > > $zeit = time(); > $ip = getenv(REMOTE_ADDR); > $file = $PHP_SELF; > > $result=@mysql_query("INSERT INTO $db_table VALUES > ('$zeit','$ip','$file')",$handler); > > @mysql_close(); > > ?>

« previous php.general (#7511) next »