I'm trying to figure out how I can generate a javascript code snippet that will allow website users to copy and paste them to their own sites, just like Google Adsense and inject the code there:
<β Begin Google Adsense code β>
<script type="text/javascript">
google_ad_client = "ad-client-code-goes-here";
google_ad_slot = "ad-slot-code-goes-here";
google_ad_width = 300;
google_ad_height = 250;
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<β End Google Adsense code β>
I would like to create something like this. I perform a similar service as a project, and I would like users to upload an image (advertisement), and then click on the link βgenerate an advertising codeβ, and then they will receive a similar code fragment similar to the one indicated above, in which they can embed on their website.
Any help on this would be great, thanks.
source
share