RE: [PHP] Low-Cost PHP Hosts?
| From: | Brian Clark | Date: | Thu, 09 Nov 2000 11:59:30 +0000 |
| Subject: | RE: [PHP] Low-Cost PHP Hosts? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24486@lists.php.net to get a copy of this message | ||
Nebbe, Joelle wrote:
While not pretty, I use something along the lines of: function ParseQueryString() { /* Ie: script.php/var1=value/var2=value */ $request = $GLOBALS['REQUEST_URI']; ereg("/([[:alnum:]]+\.php3?)", $request, $match); if(count($match) > 0) {and to search engines.Alas no, it will only work as long as you do not pass parameters If you start passing parameters many search engines will decide to ignore it (characters like ?, &, =) unless you configure your system to allow things like http://myserver/some/path/here/index.html/variable1/variable2 Now i have done this with cgi scripts, using scriptalias, but I have not tried it with php. Not sure how you can do it without having too much of a performance hit for every other page.
$string = explode("$match[1]/", $request);
$query = explode("/", $string[1]);
while(list(,$value) = each($query))
{
$pair = explode('=', $value);
$GLOBALS[$pair[0]] = $pair[1];
}
}
}
But I'm sure there is an easier way.
-Brian