Article View: ba.php
Article #80Image Filter
From: Will Tatam
Date: Tue, 20 Jun 2000 00:00
Date: Tue, 20 Jun 2000 00:00
54 lines
2397 bytes
2397 bytes
I can't remember whether this was mentioned here or in a php group.
Someone was asking if there was a way in which you could put a link to a
picture so that a page loaded with the image included (rather than just
seeing the image or having to write a page for each image)
This is how I solved it:
1) include the following filter in your Xitami setup
.jpg=c:\php\php.exe l:\php\jpg.php
2) save the following code at jpg.php
<html><head><title><?php echo $SCRIPT_NAME ?></title></head>
<body>
<img src="http://<?php echo $HTTP_HOST ?>:8080<?php echo $SCRIPT_NAME ?>"
><br>
<a href="javascript:history.back(1)"><b>Back</b></a>
<!-- More info -->
<?php
if(strstr($SCRIPT_NAME,"keyword")) {
?>descrition<?php } ?>
<!-- end of info-->
</body></html>
3) Have a second copy of xitami running that does not have the filter
included, and sits on a different port
The more info section demonstrates how you can then be more selective, for
example, if you have a range of images, lets say pictures by varying
artists, if you group them by artist then you could say if it contains "Joe
blogs" then write below "by Joe Blogs"
I have also used the same technique with Real Media files, so rather than
the file downloading when you click on the file name in the directory
listing you get taken to a page that constructs a link to the file on the
real media server, even detecting which browser you are using and changing
the link as appropriate for that browser
I hope this information is of use, and If you have any questions don't
hesitate to ask
Will Tatam
www.netmindz.co.uk/will
solution in action @ http://www.netmindz.co.uk/will/dip.htm then click HTTP
This is just a test setup running on my PC, so is only available when I'm on
the net (and also at a dynamic IP address, GGGRRRR !!!!
Technical Details
Message-ID:
<8io8fk$kd3$1@neptunium.btinternet.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108904,381a92ef8e09eaf,start X-Google-Attributes: gid108904,public X-Google-Thread: 10ce1c,381a92ef8e09eaf,start X-Google-Attributes: gid10ce1c,public From: "Will Tatam" <Will@tatam-1.freeserve.co.uk> Subject: Image Filter Date: 2000/06/20 Message-ID: <8io8fk$kd3$1@neptunium.btinternet.com> X-Deja-AN: 636869889 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Organization: BT Internet X-MSMail-Priority: Normal Newsgroups: ba.php,mailing.www.php-user