Re: dynamically generating and retrieving page data using flat files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 8, 2010 at 9:41 PM, David Mehler <dave.mehler@xxxxxxxxx> wrote:

> Hello,
> I've got a project that i have to reference information stored on one
> page from another. This page I won't be visiting first, and at the
> moment i'd prefer to use flat php files, but should that prove to hard
> i'll transition to a mysql database. I'm looking for simplicity and
> maintainability.
> I've got a page of individuals, their names, positions, and a brief
> summary of them. On the main page I want to put their names and
> positions in an ordered list, pulling that information from the second
> page. The idea is whenever the second page is updated the main page
> will automatically update.
> Suggestions welcome.
> Thanks.
> Dave.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Well, if you're seeking to avoid the DB, you could just make sure the second
page is valid XHTML.  Then the first page could just run a quick script that
parses the XML of the second page to produce the data for the list on the
first page.

You could use simplexml (or dom, or the event parser, whatever you're
comfortable with) to grab the info from the elements of second page and use
the data as you need to in the generation of the first page.  Without much
work, you could even set up a short-term cache of the first page just so it
renders quickly most of the time.

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux