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.

Guide: How To Randomize Adsense Adformats

Discussion in 'Placement / Reviews / Examples' started by StrangeLife, Oct 2, 2006.

  1. #1
    Previously I noticed a post on how to randomize the colours on the adformat using PHP:
    Guide: How To Randomize Adsense Colors
    SEMrush
    Brief:
    I thought I make my contribution and share a script which I use that randomizes adsense code which is located in a text file on your server.

    Example:
    I have created an example page to show what I mean:
    View Example

    Files Used:
    index.php - The page where random adsense code is displayed
    linkcode.inc - Text file for different ad codes
    displayad.inc - (leave alone) coding
    adrotate.php - The PHP code

    Download:
    Please download the zip and upload the folder to your root directory, in your browser goto the index.php file, it should work:
    Download

    You can view the source in the files and make any changes necessary.
    You might want to configure the "adrotate.php" file first.

    If you have problems you might want to CHMOD the file "displayad.inc" to 777

    PS: I did not make this script, I have had it for a few months so basic php knowledge would go along way for installation. :eek:
     
    StrangeLife, Oct 2, 2006 IP
    Zedzero likes this.
    SEMrush
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,860
    Likes Received:
    264
    Best Answers:
    0
    Trophy Points:
    180
    #2
    I've also written a script that allows you to randomize the size of the ad displayed. If anyone would like it, let me know
     
    frankcow, Oct 2, 2006 IP
  3. supriyadisw

    supriyadisw Peon

    Messages:
    203
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your tutorial. I use phpadsnew to make random ads format. Perhaps it will be an alternative tips. Thanks
     
    supriyadisw, Oct 4, 2006 IP