1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dynamic pictures in landing pages? Need help with Code

Discussion in 'Pay Per View' started by ubermann, Mar 24, 2010.

  1. ubermann

    ubermann Registered Member

    Joined:
    Jul 11, 2008
    Messages:
    51
    Likes Received:
    44
    Hi

    I have a php landing page for use with PPV. I know how to do dynamic keyword insertion.
    But I was wondering what the code would be for inserting dynamic picture based on url?


    Lets say for example target url was

    gumtree.com then I would want to display pic1.jpg

    or if it was

    craigslist.com then it would display pic2.jpg

    I know there must be way but my php is rudimentary at best.
    Any help would be appreciated.

    Thanks
     
  2. oxynom

    oxynom Junior Member

    Joined:
    Aug 20, 2009
    Messages:
    128
    Likes Received:
    115
    Location:
    Bangkok, Thailand
    something like this
    Code:
    <?php
    
    $targetUrl = "gumtree";
    $img[1] = "gumtree.jpg";
    $img[2] = "craigslist.jpg";
    
    switch ($targetUrl ) {
        case "gumtree":
            echo $img[1];
            break;
        case "craigslist":
            echo $img[1];
            break;
    }
    ?>
    
     
    • Thanks Thanks x 2
  3. googlecash

    googlecash Junior Member

    Joined:
    Feb 19, 2009
    Messages:
    105
    Likes Received:
    7
    Home Page:
    :( I didnt know how to build an ppv landingpage...
     
  4. ubermann

    ubermann Registered Member

    Joined:
    Jul 11, 2008
    Messages:
    51
    Likes Received:
    44
    Thanks for this. I will give it try tonight.