How to validating the adsense publisher code?
i want a php code that can check the adsense publisher code the code is contain 16 number some thing like this:
8505838780471642
1 Answer
Regex would be ^d{16}$
Explication:
html <form method=\"post\"> <input name=\"pub\" maxlength=\"16\" type=\"text\" /> <input type=\"submit\" value=\"go\" /> </form>php if (isset($_POST[\'pub\'])) { if (preg_match(\"/^\\d{16}$/\", $_POST[\'pub\'])) { echo \'ok its good\' ; }else{ echo \'its not real pub code\'; } } Posted: MacOS 2 of 2 people found this answer helpful. Did you? Yes No |
© Advanced Web Core. All rights reserved