OpenX INSERT_RANDOM_NUMBER_HERE example in php

For iframe’s and noscript tags OpenX uses a random string in the image in order to prevent user caching of banners (as that would mean less impressions and possibly outdated ads).
However these tags needs to be added by the user.
An example way to make these random numbers using PHP would be to use

<?php echo rand();?>

So an complete example invocation code would be

<a href="http://www.example.com/ck.php?n=3798N2&cb=<?php echo rand();?>" _fcksavedurl="http://www.example.com/ck.php?n=3798N2&cb=<?php echo rand();?>" _fcksavedurl="http://www.example.com/ck.php?n=3798N2&cb=<?php echo rand();?>" 
<img src="http://www.example.com/avw.php?zoneid=10&n=3798N2&cb=<?php echo rand(); ?>"></a>

Tags: , ,

Leave a Reply