Follow up question:
At 4:39 PM +0000 12/14/04, Richard Davey wrote:
sp> does anybody know how does google (and other search engines) index websites
sp> implemented in PHP + MySQL? For instance, sites which use PHP based CMS
sp> (Content Management Systems)?
It doesn't. It indexes the HTML that they output. As far as Google is concerned you could have a thousand trained monkies typing like mad for your CMS, it still only cares about the output - the HTML.
sp> Someone told us google spiders do call for the pages so they only see the sp> resulting HTML code. Is that right?
See, you knew this anyway ;)
sp> Do other search engine use different methodologies?
Thankfully not - if they could it would mean they could see into our PHP code and MySQL databases.
This is really two questions about Google indexing
Let's say I have a site in PHP & MySQL.
Let's say that I have some links on my site that use GET variables to call other PHP pages and pass them a GET variable, like
http://www.somesite.com/somedir/somepage.php?flag=15
The "flag" variable is passed to somepage.php and read by the script using $_GET['flag'] etc, etc. When you look at the page with flag=15, you get one page, when you look at it with flag=14 you see a similar page with completely different content (record #14 instead of #15 obviously)
Will Google see both pages if I have both linked with <A HREF=""> tags? Or will it stop at the question mark, only loading the page somepage.php and ignore the ?flag=14 and ?flag=15 or whatever? Will it index ?flag=14 and ?flag=15 as two separate pages (which is really what I want, since they produce different content), or will it treat both as the same page?
SECOND QUESTION, RELATED:
Same scenario, but with a POSTed form. I have several hidden FORM fields, an a drop-down, and depending on how you submit the form you get different content on the resulting page.
Will Google submit the form, perhaps a couple of different ways and treat each resulting page differently, or will it just bypass the form altogether?
THIRD QUESTION:
If the answers to the questions above are Yes and No, then I could use a dynamically generated list of links with ?flag= to make Google crawl through the part of the MySQL content (as displayed through the scripts in HTML) that I want it to, using links and GET variables, right?
If the answers to the questions above are No and No, do I have to set up a static .php page for EVERY record in my MySQL database to make it see that content I want it to see? Does anyone use the error.php page to catch for a 404 Not Found error, see if it can match the "ghost" name to a record in the DB, and display a page anyway (even though technically there is no somepage.php page, the error.php page knows to go look in the databsae for "somepage" and displays its content)? I wonder if this would be a good optimization strategy.
(Of course, some of my MySQL dbs I want it to see and others I dont)
Thanks in advance.
--
Jason Fleetwood-Boldt http://www.dataworksconsulting.net/
San Francisco, CA email jason@xxxxxxxxxxxxxxxxxxxxxxx phone 866-407-3282 fax 415-552-5912
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php