Re: [lug-nuts] modify a GOB of html files with this script!

From: Scott Tyson (tysons@deepwell.com)
Date: Tue Dec 14 1999 - 19:51:31 PST


That is what happens on my NT box with my normal mailer but it decodes the
messages itself. I also know that my *nix
users are "hostile" at any mail format other than plain text and setup
procmail to dump any html encoded messages to /dev/null/

I do not know SSI but to use php you just add <? include "footer.inc" ?>
and replace footer.inc with appropriate file name and then save the page as
either a .phtml or a .php3 and apache and php will take care of it for you
(assuming php is setup correctly.) As far as extra load goes yes there is
in theory more but I can't even see it register on top when I start
browsing through my server and I run my news pages from a mysql database on
top of that.

Judge for your self... http://rand.deepwell.com/archive.php3. This page is
in 3 pieces (main page plus 2 includes), the header graphic filename is
determined on the fly as the header.inc loads and all of the news entries
are coming from a mysql databse. When I hit it from my T1 at work the
page flashes up instantaneously with no waits at all. PHP is pretty damn
fast. Unless your into the millions of hits includes via PHP is the way to
go even on a small server.

Here is the code for the gheader graphics being loaded on the fly:

Put this at the top of the web page
<?
    $page="$REQUEST_URI";
    $page_array = explode( "/", $page);
    $page = "." . $page_array[1];
    $page1 = explode( ".", $page);
    $page = $page1[1];
?>

and use this statement where ever you wish to load an image (All of my
header graphics are named the same name as the page that will display them
followed by a -h.gif. So news.php3 would display news-h.gif)

<IMG ALT="" BORDER=0 HEIGHT= SRC="<? echo "images/$page-h.gif"; ?>"
width=500></TD>

My Server is Dual PII400, 256 megs of Ram, SCSI HD, Redhat 6.0 with Kernel
2.2.13 and It is a Quake2/3, FTP and HTTP server.

Scott

****************************************************************************
* To UNSUBSCRIBE from the list, send a message with "unsubscribe lug-nuts"
* in the message body to majordomo@saclug.org. Please direct other
* questions, comments, or problems to lug-nuts-owner@saclug.org.



This archive was generated by hypermail 2b29 : Fri Feb 25 2000 - 14:29:09 PST