I wish to know how a variable from a javascript file can be passed to PHP?
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1234567890123456";
/* snipet_name */
google_ad_slot = "123456789";
google_ad_width = 728;
google_ad_height = 90;
//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
This is a google adsense script sample, and I’ll like to know how are passed the id’s to a server database. How are generated the links based on those id’s(google_ad_client and google_ad_slot)?
Maybe my question isn’t clear just because I don’t see how the service works from the programming point of view.
PS: I don’t try to replicate or to hack google adsense service but I’m curious about how it works.