Re: Call a script as an image--Is this right?
| From: | John | Date: | Fri, 21 Jul 2000 04:03:41 +0000 |
| Subject: | Re: Call a script as an image--Is this right? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7510@lists.php.net to get a copy of this message | ||
Is this the way it suppose to be?
I tried but it still shows broken image
Thank you again?
<?
include ("user.php");
$imgfile="http://mydomain.com/images/1.gif";
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();
?>
John wrote:
>
> Thank you Andreas.
>
> Actually I am not tracking users IP adress.
> The script is a part of who's online script.
> I use a remote service(web based email) and I want to include those
> users also in my site to show who's online.
>
> Thanx again
>
> Andreas Pour wrote:
> >
> > John wrote:
> > >
> > > Call a script as an image from a remote server
> > >
> > > Hi,
> > >
> > > In the below code(let's call it count.php) I want to insert an image.
> > > I want to call this script from a remote server as an image and instead
> > > of showing a broken image link, I want it to show an image.
> > >
> > > <img
> > > src="http://mydomain,com/count.php">
> > >
> > > Is there any way I can do this ?
> > >
> > > Thanks in advance.
> > >
> > > John
> > >
> > > ##################
> > > Count.php
> > > ##################
> > > //<?echo "<img
> > > src=\"http://mydomain.com/images/1.gif\">";?>
> > > <?
> > > include ("user.php");
> > > $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);
> >
> > Although I can't approve of tracking user's IP addresses like this, just
> > add the lines
> >
> > header("Content-type: image/$imgtype");
> > header("Content-Length: " . filesize($imgfile));
> > @readfile($imgfile);
> >
> > Ciao,
> >
> > Andreas
> >
> > --
> > 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
>
> --
> 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