database calls with no ? in URL
| From: | James M. Burton | Date: | Fri, 21 Jul 2000 05:02:05 +0000 |
| Subject: | database calls with no ? in URL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-7517@lists.php.net to get a copy of this message | ||
i have a database driven site
i currently pass a variable value in the url like this:
http://ndpcaucus.sk.ca/bio/member.php3?mbrsurname=Addley
this allows my script to make calls to the database
the ? makes most crawlers skip these urls
i want these pages crawled. i need to turn the variable into a file name.
i want:
http://ndpcaucus.sk.ca/bio/Addley.php3
or
http://ndpcaucus.sk.ca/bio/member.Addley.php3
i also have articles which are called with urls like:
http://ndpcaucus.sk.ca/news/read.php3?id=119
i want:
http://ndpcaucus.sk.ca/news/read.119.php3
or
http://ndpcaucus.sk.ca/news/119.php3
or
http://ndpcaucus.sk.ca/news/federal.transportation.reforms.announced.
php3
(the title with spaces replaced with dots)
a quick kludge in my current thinking is to have the script which
creates the db record create a file called Addley.php3 which contains
the variable to be passed, eg:
<?
$mbrsurname = 'Addley';
include ("member.php3");
?>
but, i think that is messy. i don't want to do it that way. it is not
elegant. there is a way to create file names on the fly. i just don't
know it. eg:
http://www.php.net/manual/function.fputs.php
http://www.php.net/manual/html/function.fputs.html
help
--
James M. Burton Bus. 306.569.7790
mailto:jburton@bfsmedia.com Fax. 306.949.0430
Internet Information Services 2132 Broad St.
BFS Media Group Inc. Regina, SK
http://www.bfsmedia.com/ CANADA S4P 1Y5
"When you will survive if you fight quickly and
perish if you do not, this is called dying ground"
- Sun Tzu, The Art of War