How can I recognize or identify using PHP or Javascript if the submitted code equal to google adsense code?
For example, I submit several javascript codes to my site through a form, and the program should recognize when I submit the Google Adsense code. How is this possible? And I mean that I represent any AdSense code, the software recognizes it. Thanks everyone for any idea!
I would like to solve the problem, but I have no idea how to start.
Some of the ways I started thinking about (please do not read this before you have an idea or it confuses you )
I submit the code, and PHP checks to see if the code contains the usual elements from the AdSense code. I realized that this test is bad because the code may contain elements of the AdSense code, but it can be deployed using unique elements, so the code is still being tested.
Another way I started thinking was to write a program that restricts code entry, and the restriction concerns the length of the AdSense code, but I realized that the length of the AdSense code changes from time to time.
Another way I was thinking about is to manually check if the AdSense code is submitted or not. Worst decision.
source
share