Remove unwanted email address from URL

2019-09-07 06:46发布

I'm running a site that has google adsense advertisements on it, and they recently notified me that I'm passing PII (Personally Identifiable Information) to them. This came as a surprise, since I intentionally designed the site to avoid doing that and have come to find out that some users are not following the directions on the website for referring traffic and are inputting their EMAIL ADDRESSES instead of their referral numbers.

For example, they should be using http://www.scratch4satoshis.com/?r=2127

but instead are using http://www.scratch4satoshis.com/?r=redacted@sample.com and so, the traffic they send there are shown google ads and if they click them, pass that PII along to google and now they're threatening to close my adsense account.

The site is written in PHP; I'm wondering if there is a way to modify the information being passed to Google Adsense?

标签: php email url
1条回答
何必那么认真
2楼-- · 2019-09-07 07:08

Try to filter get parameter as integer values:

$r = intval($_GET['r']);
查看更多
登录 后发表回答