Help.. PHP Adwords Dynamic landing page

Discussion in 'Programming' started by gregking, Apr 9, 2008.

  1. #1
    First off I am not a php developer, but in theory this seems pretty easy to do.. i wonder if there was a basic tutorial that could help me out..

    Essentially i want to display a dynamic image and dynamic content in my landing page based on keyword.

    I would like to accomplish something as follows:

    User arrives via adwords keyword "Brokeback Mountain Rental"

    http://www.landingpage.com/page.html?key=Brokeback%20Mountain%20Rental


    A portion of the page changes to the brokeback mountain dvd cover that i host on my sever, or that i pull from the web. A portion of the website changes to the summary of the movie.

    User arrives via adwords keyword "Titanic Rental"

    http://www.landingpage.com/page.html?key=Titanic%20Rental
    A portion of the page changes to the titanic dvd cover that i host on my sever, or that i pull from the web. A portion of the website changes to the summary of the movie.

    Any links to a tutorial... source of similar script.. or assistance would be greatly appreciated.
     
    gregking, Apr 9, 2008 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #2
    it is quite easy to do

    at the top you get the keywords and store them in a variable like this

    
    $keywords = $_GET['key'];
    
    PHP:

    Then wherever you want to have content show up dynamically do some code like this


    
    
    if ($keyword == 'Brokeback Mountain Rental') {
    
        // the code for the Brokeback Mountain Rental keyword goes here 
    
    }
    elseif ($keyword == 'Rush Hour') {
    
        // the code for the Brokeback Mountain Rental keyword goes here 
    
    }
    else {
    
        // if none of the above keywords are set or no keyword is set display this code 
    }
    
    
    PHP:
    you can have as many elseif conditions as you like. Within the brackets you can query the database for images and text or anything else you want.

    Hope it gets you started.
     
    stephan2307, Apr 10, 2008 IP
  3. kaijohannkursch

    kaijohannkursch Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The hard thing is getting all those keyword urls (?key=abcdef) set. You should try instead working with the http referrer ($_SERVER['HTTP_REFERRER'] in PHP), so you can know the referring site/keyword used and code accordingly with no need of multiple urls (just one landing url). There are scripts that get easily that information. This will work not only with adwords but also with organic results.
     
    kaijohannkursch, Apr 11, 2008 IP