1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Simple method for dynamic meta tags?

Discussion in 'PHP' started by mdvaldosta, Sep 30, 2005.

  1. #1
    Got a 500 page site, built in php. The content pages uses a php includes for the header and footer.

    Is there any code I can use in the header file, that would parse the contents of the page and insert into the meta tags?
     
    mdvaldosta, Sep 30, 2005 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could call ob_start in your header then in the footer call ob_get_contents (I think that's what it's called) Then parse that and add your meta tags in the <head> tag. :) You can look up output buffering on php.net
     
    exam, Sep 30, 2005 IP