RE: [PHP] creating flat versions of php pages

From: Date: Mon, 24 Feb 2003 20:17:06 +0000
Subject: RE: [PHP] creating flat versions of php pages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136971@lists.php.net to get a copy of this message
sounds close, but the latest stories are going to have to be generated every hour or so, so what are the functions to do this in php though ? would fopen,fread and fwrite do the trik ? i need a way to hange the links within the page all back to html so somehow doing a preg_replace for foo.php?id=1 to foo/1.html , foo/2.html etc -----Original Message----- From: Mark Cubitt [mailto:mark.cubitt@applegate.co.uk] Sent: Monday, February 24, 2003 10:50 PM To: electroteque; php-general@lists.php.net Subject: RE: [PHP] creating flat versions of php pages Are all the news stories in a database? If so we are current in devolopment of a simaliar site (although not news), we are using Perl scripts to build all the HTML pages (both Index's and Pages) during the evening (4am), it takes about 8 secs to build 2500 pages and the Perl scripts could be a lot more efficiant, we are using PHP todo all the admin and stat areas of the site. Static HTML pages not only increase the speed but they also improve SEO (Search Engine Optimasion) if handled correctly. Don't know if this will help you but maybe it is a an idea. Also i'm sorry if this answer takes this a little off topic. regards Mark Cubitt > -----Original Message----- > From: electroteque [mailto:daniel@electroteque.org] > Sent: 24 February 2003 11:13 > To: php-general@lists.php.net > Subject: Re: [PHP] creating flat versions of php pages > > > i dont understand what you mean , anyway, this is a short term > situation as > the site is pretty slow and cpu intensive, the setup is a sun solaris box > running apache 1.3 and php3 , just had a meeting today to push > through apahe > 2 and php 4.3 ut wont happen for a while , we need a solution in the next > month, we basically need a system that will trawl the site or the latest > news and flatten them so they are less taxing on the server as > our last time > cost us dearly , 170,000 hits in one day ! > so would flattening to html solve our problem or is the server > going to get > hammered anyway ? > > "Gonzo" <gonzo-list@nullcraft.com> wrote in message > > news:34998.192.168.2.61.1046081917.squirrel@hermes.nirvani.net... > > > hi guys we have 2 very high traffic sites and we need > > > to be able to make these pages load faster , we are > > > coming up with a solution to make flat file versions of > > > the sites in the short term before we start using > > > caching technologhies is this the right way to go about > > > this ? > > > > I think anyone trying to answer this would need to know > > more about your setup. Caching is not necessarily the > > answer if a dynamic page is dynamic enough every time to > > be different. (Please keep this on-list) > > > > > also whats is the best way to parse a php page > > > ie foo.php?id=1, foo.php?id=2 with the contents of each > > > story to a file and update all the links. maybe with > > > naming conventions like foo/1.html, foo/2.html in a mod > > > rewrite style > > > > I like using Variables from URI: > > > > http://nirvani.org/software/variables_from_uri/ > > > > Gonzo > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > ****************************************************************** > ************ > This email has been virus checked by the Eclipse Internet > MAILsafe service > ****************************************************************** > ************ > www: http://www.eclipse.net.uk/ email: > eclipse@eclipse.net.uk > ****************************************************************** > ************ > >

« previous php.general (#136971) next »