Re: Call a script as an image--Is this right?
| From: | John | Date: | Fri, 21 Jul 2000 04:09:36 +0000 |
| Subject: | Re: Call a script as an image--Is this right? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7512@lists.php.net to get a copy of this message | ||
Thank you very much.
It works flawlessly.
Best Regards,
John
Andreas Pour wrote:
>
> 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();
> >
> > ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net