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.

How to display adsense ads randomly?

Discussion in 'Placement / Reviews / Examples' started by yisou, Mar 8, 2005.

  1. #1
    Hi,
    I am a greehand about adsense ads,I want to display adsense ads randomly,just like this forum, I will appreciate it very much if anybody teach me how to do. I have asp and php web hosting.
     
    yisou, Mar 8, 2005 IP
  2. obenix

    obenix Eats an apple a day......

    Messages:
    2,236
    Likes Received:
    180
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What do you mean randomly... Adsense serves ads based on the content. If your page talks about golf, then ads pertaining to golf will appear... If your page is on Her Majesty Queen Elizabeth, then ads pertaining to HM will appear...

    If Adsense cannot determine the content, you get public ads (worthless to us)...
     
    obenix, Mar 8, 2005 IP
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    digitalpoint, Mar 9, 2005 IP
    nevetS likes this.
  4. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #4
    That is so cool!! Thanks a million, I didn't know that feature existed, it will sure increase my CTR
     
    fryman, Mar 9, 2005 IP
  5. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #5
    That's great info!
     
    nevetS, Mar 9, 2005 IP
  6. TheWebJunkie

    TheWebJunkie Banned

    Messages:
    630
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #6
    TheWebJunkie, Mar 9, 2005 IP
  7. Tuning

    Tuning Well-Known Member

    Messages:
    1,005
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    138
    #7
    Thanks DP, I was doing php radom() function to call different colors.

    Regards,
    Tuning
     
    Tuning, Mar 9, 2005 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    I use PHP to do it on the backend too, but doing it within the AdSense setup is the "easy" way.
     
    digitalpoint, Mar 9, 2005 IP
  9. paymentapprovaltooslow

    paymentapprovaltooslow Banned

    Messages:
    1,038
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Um modifying the code is against the TOS
     
    paymentapprovaltooslow, Mar 9, 2005 IP
  10. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #10
    Code isn't modified.
     
    digitalpoint, Mar 9, 2005 IP
  11. paymentapprovaltooslow

    paymentapprovaltooslow Banned

    Messages:
    1,038
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Um ok..but be carefull...
     
    paymentapprovaltooslow, Mar 9, 2005 IP
  12. dfsweb

    dfsweb Active Member

    Messages:
    1,587
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    88
    #12
    Yeah, they do say that the code needs to be pasted as it is. So, even changing the colour would be "technically" categorised as editing the code.

    But, I doubt if Adsense would worry too much in this case, 'cos only the colours are being changed and nothing dodgy is being done. Having said that, I wouldn't do it.
     
    dfsweb, Mar 9, 2005 IP
  13. Tuning

    Tuning Well-Known Member

    Messages:
    1,005
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    138
    #13
    Google team wont be able to recognize this color change coding. It will be given out as normal javascript as we see normally. ;)

    Check view source of this page, can you see any coding for colors ? :rolleyes:
     
    Tuning, Mar 9, 2005 IP
    dfsweb likes this.
  14. dfsweb

    dfsweb Active Member

    Messages:
    1,587
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    88
    #14
    I don't think they see the same version of the site as your web browser does. I think they probably do a file_get_contents (or equivalent). I am saying this as I have a guestbook on my photography site and I tried placing ads on that page. The page doesn't have much static content, as the guestbook is loaded from a mySQL table.

    I kept getting ODBC and mySQL related ads on this page .... although if you have a look at the "source" you won't see a single mysql or odbc related keyword. This means that they must be looking at the real code of the page and not the code you see by viewing the source. I have taken the adsense ads off that page since then as there was no real point displaying unrelated ads..

    So, Google can (trust me) find out if the Adsense code has been changed. In this case, it's not much of a problem though 'cos only the colours are being changed.
     
    dfsweb, Mar 9, 2005 IP
  15. david_sakh

    david_sakh Peon

    Messages:
    1,225
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #15
    you can choose to include it from four different files, or four different array elements, nothing is modified either way. I used to do that to rotate ads with internal notices.
     
    david_sakh, Mar 9, 2005 IP
  16. tom22

    tom22 Peon

    Messages:
    98
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #16
    No modification of the code at all is required. Just have php randomenly pick one of out however many different blocks of adsense code that that you have.
     
    tom22, Mar 9, 2005 IP
    dfsweb likes this.
  17. paymentapprovaltooslow

    paymentapprovaltooslow Banned

    Messages:
    1,038
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #17
    That could work then I take it.
     
    paymentapprovaltooslow, Mar 9, 2005 IP
  18. yisou

    yisou Banned

    Messages:
    102
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Many thanks,that's what i want.
     
    yisou, Mar 9, 2005 IP