Re: Search Engines and PHP

From: Date: Tue, 23 Jan 2001 22:22:05 +0000
Subject: Re: Search Engines and PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-36279@lists.php.net to get a copy of this message
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 > webpharmacy@brokenhill.net > 191 Grand Street, Brooklyn NY 11211 > 718.599.4893 > ______________________________________ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Joe Stump, PHP Hacker joestump98@yahoo.com http://www.miester.org/

« previous php.general (#36279) next »