I recently created such a system, please see its textsensor.com website promotion . So, as we do this, you need to consider these points.
1) Cross Ajax domain is not allowed, therefore, no data is sent to your server when some user clicks on an ad that may be present on the website of any publisher, and you may have received them in thousands.
2) , , :), .
3) script, - .
4) .
<script src="http://dennis.com/ads_application/get_my_ads.php">
, php, 1 js, php -,
<script type="text/javascript" src="http://www.dennis.com/ad_application/inline.js">
</script>
5) , script script inline.js 4.
<script type="text/javascript">
var ad_publisher = "5122";
var ad_campaign = "11129";
var ad_type = "inline";
</script>
6) , -
7) inline.js textsensor.com
8). , , , ipaddress, cookie. , ipaddress , .