Search code examples
djangodjango-templatesopenx

Django and Openx?


Somebody know how use OpenX (php app) with Django? I need to use OpenX or a similar software for displaying ads.


Solution

  • You can implement Openx using javascript, so as long as you run Openx on a php server, that should be easy.

    Header, something like this:

    <script type='text/javascript' src='http://something.here/delivery/spcjs.php?id=1&amp;block=1'></script>
    

    And then, something like this where you want to put you ad.

    <script type='text/javascript'>
        OA_show(1);
    </script>
    <noscript>
        <a target='_blank' href='http://something.here/delivery/ck.php?n=112bda3'>
        <img border='0' alt='' src='http://something.here/delivery/avw.php?zoneid=1&amp;n=112bda3' /></a>
    </noscript>
    

    OpenX generates all this code for you.