Randomize YPN and Adsense
This is really very simple but I have been asked a number of times how I do this on some of my sites.
The Code
Public Shared Function placeAds(channel as integer,width as integer,height as integer,linkColor as string)
Dim r as New Random
Dim x as integer
Dim adSTR as String
x = r.Next(0, 100)
if x > 50
adSTR = ("" & vbcrlf)
adSTR &= ("" & vbcrlf)
else
adSTR = ("" & vbcrlf)
adSTR &= ("" & vbcrlf)
end if
Return adSTR
End Function
Useage
placeAds(channelID,width,height,linkcolor)