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.
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)...
When you get your AdSense HTML code, you can choose up to 4 color formats to rotate with on that screen. https://www.google.com/support/adsense/bin/answer.py?answer=9981
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.
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 ?
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.
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.
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.