UI enabled URLS with built-in "cache"

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
piuga
Forum Newbie
Posts: 9
Joined: Fri May 10, 2002 11:24 am
Location: Relative to what?

UI enabled URLS with built-in "cache"

Post by piuga »

Ok, got this idea and wonder whats wrong with it (I mean I'm average smart not a genius, so why hasn't anyone allready done this, or if it's done, please direct me to that place...)

No mather in what way you generate your "pages" (template, db-back-end, etc) you could use this; the idea is this:

- configure your server to use a php-script as the 404-document (thus this solution is server independent, although possibly not usable for free-hosted-sites)
- design a URL-schema and prepare to generate "pages" acoording to this;
example:

example.com/products/hardware/graphics/geforce3

would, the first time (or if the "page" has expired) generate the file:
example.com/products/hardware/graphics/geforce3/index.php
and then show the contents of this file; the following times this file is requested it's allready there! (throw in some; time-out function in the top of the document, and possibly some banner rotating-function or some other small(?) dynamic content function; and your done)
Thats it, what do you think?

ps. it also scales beautifully to multilingual sites thus requesting:
example.com/produkter/hårdvara/grafik/geforce3 would generate the swedish version of the "page"
gate
Forum Newbie
Posts: 1
Joined: Thu Jan 23, 2003 4:31 pm

Post by gate »

Ive been using that method for 2 years now mate.
PHP.net does it -> e.g. http://uk.php.net/fsockopen

Its a good way to get se's to spider deep into your site, without having to user horrible urls ?id=blah.
User avatar
piuga
Forum Newbie
Posts: 9
Joined: Fri May 10, 2002 11:24 am
Location: Relative to what?

ok, but caching also?

Post by piuga »

Ok, I know that, but is it also using the cach idea, I meant for like example using the Smarty-template enginge (smarty.php.net) and rewrite it's caching so that the file:

example.com/products/hardware/graphics/geforce3/index.php

really exists, not only leads to a 404 and then handled by a errorhandling script that redirects to the real location or creates a temporal "page" for that request.

comments?
Post Reply