Page 1 of 1

Adding Meta Tag Titles

Posted: Fri Oct 11, 2002 1:39 pm
by Cklaszlo
We have this massive database with every major roller coaster and amusment park. How do you make it so each page can automatically generate a custom MetaTag and also Custom Title? I notice that VB does this where threads are made into the Meta Title.

For Example a Park page:

http://www.thrillnetwork.com/index.php? ... &parkid=62

I'd like this page's title to be:

ThrillNetwork: Cedar Point


For Example a Coaster Page:

http://www.thrillnetwork.com/index.php? ... terid=1535

I'd like this page's title to be:

ThrillNetwork: Wicked Twister (Cedar Point)

Thanks!

Alex

Posted: Fri Oct 11, 2002 4:46 pm
by mydimension
in your database query you should get the name of the theme park and place it into a variable (ie. $theme_park_title) and then when you get to outputting your title tage just print this:

print "<title>$theme_park_title</title>";

not to hard, just make sure you get the thme parks name before you output the title.

Posted: Wed Nov 20, 2002 2:56 pm
by Cklaszlo
Question #2

How do we get Google to search PHP pages with Mysql queries

I don't think so

Posted: Wed Nov 20, 2002 10:11 pm
by phpScott
As far as I know they can't.
Search engines don't know or care to follow dynamic pages, as the possibilities are potential endless. If the page doen't end in htm, or html or the like the crawler just won't follow the link.
I know some of this because a project that I am currently working on wanted to have all sorts of customer pages to be able to be indexed by the search engines. The best that I could come up with is to use php to create a html page that can be updated by rewriting the page every time a change is made. A real pain in the pants but it was the only way that I know that could be done so the search engines will find the pages.
It also helps if there is another page that has links to all these 'static' pages that is linked to off of the front page.
Hyper link a period or something unobtrusive so the crawlers will find it but the average surfer won't.

That's my 2 cents.

phpScott

Posted: Wed Nov 20, 2002 10:53 pm
by mydimension
to build on what phpScott said, search engines in general won't follow a link with a question mark (?) in them. this can create a bit of a problem for php pages or anypage that sends variables through the url. here a few links that may help you build a site structure that is both user and search engine friendly:
http://www.alistapart.com/stories/urls/ <- the one i prefer
http://www.alistapart.com/stories/succeed/ <- the one people may feel more comfortable with

Posted: Thu Nov 21, 2002 2:54 am
by twigletmac
Erm, Google does dynamic sites just fine although it may limit how many pages it crawls so that the Googlebot doesn't end up in a loop that crashes your server. Your pages do not have to end in .htm and .html either - .php, .asp, .jsp, .pdf and more all get indexed.

Although the major search engines definitely seem to prefer static seeming pages (even if the content is still totally dynamic) they will still index your pages if you have a question mark in the URL but they may get sniffy if you have loads of parameters.

Mac

Posted: Thu Nov 21, 2002 8:12 am
by Cklaszlo
I've heard of scripts that can completly mirror your site as static html. And that you then submit those pages to Google. Do you know of any of these scripts?

Posted: Thu Nov 21, 2002 8:15 am
by twigletmac
For all kind of scripts: http://www.hotscripts.com

Although it might be more useful to look into URL rewriting as mentioned in mydimension's post.

Mac

Posted: Thu Nov 21, 2002 8:19 am
by Cklaszlo
I think you meant: http://www.hotscripts.com :D

Posted: Thu Nov 21, 2002 8:22 am
by twigletmac
That's what happens when people send you email when you're trying to type, it all goes wrong :oops: :lol: .

Mac