RE: [PHP] Search Engines and PHP
| From: | Kristofer Widholm | Date: | Tue, 23 Jan 2001 19:19:46 +0000 |
| Subject: | RE: [PHP] Search Engines and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36247@lists.php.net to get a copy of this message | ||
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 variablesI'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 ______________________________________for the pagesyou want to have the searchengine spider.How the heck do you build a dynamic site without URL variables, cookies, or POST variables? KristoferOne 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.