in reply to Re^2: Parsing HTML code for formatting into JavaScript
in thread Parsing HTML code for formatting into JavaScript

What I am trying to do is display Google AdSense ads (or other ads) on my website and others, in a rotation with other ads. I know this is somehow possible (without violating Google's rules) b/c the PHP program OpenX ad server does it.

It is possible with server side scripts - for example the server could keep a list of five ad snippets, and randomly deliver one of them on each request. That way the client always sees the unmodified HTML+JS that Google gave you.

It's also a bit simpler to implement, because it doesn't imply parsing HTML.

  • Comment on Re^3: Parsing HTML code for formatting into JavaScript

Replies are listed 'Best First'.
Re^4: Parsing HTML code for formatting into JavaScript
by anxara (Initiate) on Feb 10, 2009 at 17:33 UTC
    I am familiar with SSI but a lot of the sites the ads will be displayed on do not support SSI nor will they have access to the original perl script. This is why I am trying to display the ad through a <script src="..."> method as opposed to SSI.