Location: PHPKode > projects > newspaper.php > newspaper-php/description_how_this_works/index.html
<HTML>
<HEAD>
  <META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win">
  <TITLE>newspaper.php - Easy Dynamic Webpages</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">

<H1><TABLE BORDER="0" CELLSPACING="2" CELLPADDING="0">
  <TR>
    <TD WIDTH="50%">
    <A HREF="../../newspaper.de/description_how_this_works/index.html"><IMG 
    SRC="../../newspaper.de/description_how_this_works/selection_german.gif"
    WIDTH="90" HEIGHT="20" ALIGN="BOTTOM" BORDER="1" NATURALSIZEFLAG="3"></A>
</TD> 
    <TD WIDTH="50%">
    <A HREF="index.html"><IMG SRC="../../newspaper.de/description_how_this_works/selection_english.gif"
    WIDTH="90" HEIGHT="20" ALIGN="BOTTOM" BORDER="1" NATURALSIZEFLAG="3"></A>
</TD> 
  </TR>
</TABLE></H1>

<H1><FONT FACE="Arial">newspaper.php - Easy Dynamic Webpages</FONT></H1>

<H3>What it does...</H3>

<P><IMG SRC="directory.gif" WIDTH="362" HEIGHT="317" ALIGN="RIGHT"
BORDER="0" NATURALSIZEFLAG="3">Newspaper.php is a script-program
which concatenates all valid webpages out of a bundle in a directory.
But only those which are needed for <I>today.</I> You decide which
pages shall be visible by a configuration file called newspaper_include.php
which you simple edit by notepad.</P>

<H3>What you need...</H3>

<P>You need php-script-language configured at your providers webserver.</P>

<H3>Where to get, an example to take a look on</H3>

<P>You get the sample directory zipped to<A HREF="../newspaper.zip">
newspaper.zip here</A>. It's free.You can see an <A HREF="http://lisa.d.franken.de/newspaper">example
here.</A></P>

<H3>How it works...</H3>

<P>1. index.html leads only to the real workhorse newspaper.html.
This file exists because most webservers are configured to show
index.html as default page when calling a directory on a webserver.</P>

<P>2. You have some single, very usual webpages like</P>

<UL>
  <LI><A HREF="../lisa_head.html">lisa_head.html</A> (shall be
  shown on the top of the page)
  <LI><A HREF="../lisa_carneval2002.html">lisa_carneval2002.html</A>
  (an article about carnival in my city, shall be show in February
  only)
  <LI><A HREF="../lisa_induction_computerroom_elementary_school.html">lisa_induction_computerroom_elementary_school.html</A>
  (an article shall be shown only until a certain date)
  <LI><A HREF="../lisa_never_never_see_this.html">lisa_never_never_see_this.html</A>
  (an invalid article which was interesting in January 2001, it
  will not be shown anymore)
  <LI><A HREF="../lisa_searchmachines.html">lisa_searchmachines.html</A>
  (Links to searchmachines, shown always)
  <LI><A HREF="../lisa_footer.html">lisa_footer.html</A> (footer
  of the newspaper-page, shown always)
</UL>

<P>3. You must configure the file newspaper_include.php which
looks like this. At least you should change the thick parts of
it:</P>

<P><CENTER><TABLE WIDTH="95%" BORDER="1" CELLSPACING="2" CELLPADDING="0">
  <TR>
    <TD WIDTH="100%" VALIGN="TOP">
    <PRE>&lt;?
// title of the webpage in html-code:
$Ititle=&quot;What's up in Oberasbach where I live&quot;;
switch (true) {
	// You have to know these facts about your server:
	// How is your website called from a user's webbrowser?
	case ( strcmp($HTTP_HOST,&quot;<B>lisa.d.franken.de</B>&quot;) == 0 ):
		// Usually newspaper.php is in the same directory like 
		// the html-documents it is building together to one webpage:
		$Inp_art_fqdn=&quot;.&quot;;
		// How is this directory called from a user's webbrowser?
		// You have to put all your webdocuments in this directory.
		// All picures have to be linked relative to this directory.
		$Inp_art_www=&quot;<B>http://lisa.d.franken.de/newspaper/</B>&quot;;
		break;
	// This directory is replicated to my other server
	case ( strcmp($HTTP_HOST,&quot;lena.franken.de&quot;) == 0):
		$Inp_art_fqdn=&quot;.&quot;;
		$Inp_art_www=&quot;http://lena.franken.de/php_hier/newspaper/&quot;;
		break;
}
	
// which files could be used to build this webpage from?
// The head of the page, this is valid forever. Look at the dates: beginning, ending
// The dates are d.m.yyyy hour:min
$Ishowme[]=&quot;lisa_head.html|1.1.1900 0:00|31.12.9999 23:59&quot;;
$Ishowme[]=&quot;lisa_never_never_see_this.html|1.1.2002 0:00|15.1.2002 18:00&quot;;
//
// The induction of the elementary's school computer-room is only interesting
// for this month, but I will let it for a year so you can see how this program
// works:
$Ishowme[]=&quot;lisa_induction_computerroom_elementary_school.html|30.1.2002 0:00|28.2.2003 23:59&quot;;
// Usually this is only valid until end of carneval, but you will find it a long
// time for test purposes:
$Ishowme[]=&quot;lisa_carneval2002.html|28.1.2002 0:00|12.2.2003 18:00&quot;;
// Links to searchmachines, forever
$Ishowme[]=&quot;lisa_searchmachines.html|1.1.1900 0:00|31.12.9999 23:59&quot;;
// Footer, is always at the end of a page
// PHPSCRIPT_HINT will be changed to a hint to this script
$Ishowme[]=&quot;lisa_footer.html|1.1.1900 0:00|31.12.9999 23:59&quot;;

?&gt;</PRE>
</TD>
  </TR>
</TABLE></CENTER></P>

<P>4. Upload it to your webserver and point your webbrowser to
the directory.</P>

<P><HR ALIGN=LEFT><BR>
Written by <A HREF="mailto:hide@address.com">Richard Lippmann</A>.
Back to <A HREF="http://lena.franken.de/">http://lena.franken.de</A>,
my homepage</P>

<P>&nbsp;

</BODY>
</HTML>
Return current item: newspaper.php