Dynamic Content From Search or Link

Discussion in 'PHP' started by Amsterdam, Oct 12, 2009.

  1. #1
    Hi,

    Can anybody tell me how easy / difficult it would be to build a site similar to this one? I realise the site is very spammy, but I've been asked the question.

    I'm not looking to build a comparison site, just one that features a page for all of the place names. The only thing that changes is the place name as far as I can tell. To build it with pure HTML would be impractical and I know that there is a way to 'inject' content into a page with PHP.

    Any suggestions gratefully received.

    T

    p.s. Can the page title and meta tags also be created dynamically?
     
    Amsterdam, Oct 12, 2009 IP
  2. dsignresponder

    dsignresponder Greenhorn

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #2
    Forget HTML if you want to build a site like the one you mentioned. It's not a big deal to write a php script that will output that (or similar) content, but we don't know how good are you in PHP? I suppose there is a database which is storing those 'categories' and the links, so PHP suppose to read the database and echo the content accordingly...

    Page title and meta tags also can be dynamic.
     
    dsignresponder, Oct 12, 2009 IP
  3. Amsterdam

    Amsterdam Well-Known Member

    Messages:
    361
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #3
    Thanks for the response dsignresponder.

    I have a rudimentary knowledge of PHP and MySQL. From what you say, I suppose I will need to set up a database of all of the different 'categories' and then pull the info from that?

    Do you have any links where I can see some examples or tutorials? esp. for page title and meta tags.

    Thanks!

    T
     
    Amsterdam, Oct 12, 2009 IP
  4. dsignresponder

    dsignresponder Greenhorn

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #4
    That's correct!
    Best thing is to store your data in a MySql (or other type of) database on the server. I.E. in a table_category you create columns like id, category_name, category_description, website_link, author, etc.... It's easy to write a php script to edit/update these table fields (with admin privileges of course) and then it's a piece of cake to echo the table fields into a 'css-formatted' web page.

    You don't need a tutorial to see how can you 'write' title and meta tags with php. Simple :
    
    <title><?php print $title; ?></title>
    <meta name="keywords" content="<?php print $meta_keywords; ?>">
    
    PHP:
    You can store the variables $title and $meta_keywords in a database as well.
    Hope that might help you to see how/where to start...
    :)
     
    dsignresponder, Oct 12, 2009 IP
    Amsterdam likes this.
  5. Amsterdam

    Amsterdam Well-Known Member

    Messages:
    361
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #5
    Many thanks for the useful info dsignresponder (you got green).

    I should have already realised about the title and meta tags as I've seen the same thing used for CMS systems etc.

    I guess I'm just starting to get my head around how to go about this...

    T
     
    Amsterdam, Oct 12, 2009 IP
  6. dsignresponder

    dsignresponder Greenhorn

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #6
    You're welcome T! Happy to help!
    P.S. : thanks for the 'green'! :)
     
    dsignresponder, Oct 12, 2009 IP