You might want to look at Jeremy Brands VERY useful "variables from uri"
function that can be found at http://www.nirvani.net/software/ I use this
religiously and am quite pleased with it.
--Joe
On Tue, Jan 23, 2001 at 02:19:46PM -0500, Kristofer Widholm wrote:
> At 13.33 +0100 01-01-23, Sander Pilon poked the keyboard as follows:
> > >
> >> >If you want to be totally searchengine-safe, do not use variables on the
> >> >url, do not rely on cookies and do not rely on POST variables
> >> for the pages
> >> >you want to have the searchengine spider.
> >>
> >> How the heck do you build a dynamic site without URL variables,
> >> cookies, or POST variables?
> >>
> >> Kristofer
> >
> >One way would be to use the url path.
> >
> >Http://script.php/these/are/variables/passed/to/php
> >
> >You fool the searchengine, it thinks 'script.php' is a directory and its
> >getting a file called 'php', but actually you're calling 'script.php' with
> >'/these/are/variables/passed/to/php' as parameters.
>
> I'm assuming that the tradeoff is the loss of having your variables
> pre-populated in your scripts and that you have to parse the URL for
> them. While it's probably easy enough to write my own, does anyone
> have -- ready made -- a robust and versatile function for populating
> variables from a URL.
>
> My impulse is to go with this:
>
> list($var1,$var2,$var3)=explode("/","$PHP_SELF");
>
> Anyone one have a better idea?
>
> A difference to note, it strikes me, is that using this method, it is
> no longer arbitrary in which order the variables are stacked in the
> URL. <http://domain/script.php/value1/value2/value3> would be a
> different page from <http://domain/script.php/value3/value1/value2>,
> whereas using variable declarations in the URL like so
> <http://domain/script.php?value2=foo&value3=bar&value1=barfly> means
> you can put them in any order you like.
>
> Kristofer
> --
> ______________________________________
>
> Kristofer Widholm
> Web Pharmacy
> [EMAIL PROTECTED]
> 191 Grand Street, Brooklyn NY 11211
> 718.599.4893
> ______________________________________
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]