0
我正在網站上的成員可以發佈自己的Adsense橫幅到網站上。最初我想用Adsense API與用戶分享收入。 (他們只需輸入他們的Adsense發佈者ID),但我發現我不符合使用API的要求。在一個網站上的多個Adsense廣告 - 避免SQL注入
我的選擇是允許用戶提交他們的整個AdSense廣告單元代碼,這將是什麼樣子,
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxx";
/* 300x250, created 10/4/10 */
google_ad_slot = "7431428552";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
有過濾所有以確保用戶不會提交有害代碼的安全方法?
謝謝!我沒有聽說過ctype_digit。我會放手一搏! :)數據類型的建議非常好! – CyberJunkie 2010-10-06 22:02:14