I have a member area, where they can add their domains and it will be displayed in the profile page..but now I want to add a verification process, just like google web-masters does..where they need to upload a certain file and so.. please tell me whats the best way to do this ?
Thanks :)
We can do this in PHP via Regx aka Regular Expression. We can perform 3 checks: first, the characters need to be lowercase/uppercases, digits, hypens, and dots. Second, the overall domain length should between 1 to 253. Lastly, the length of each label (separated by dots) should be no longer than 63 characters.
If you want to find out if a domain name is validated, simply type the URL into the WHOIS database. The search results will also provide you with other crucial information such as who owns it, when it was registered and when it is due to expire.
The easiest and safest way to check whether an email address is well-formed is to use PHP's filter_var() function.
[A-Za-z0-9-]{1, 63} represents the domain name should be a-z or A-Z or 0-9 and hyphen (-) between 1 and 63 characters long.
It's not really black art as we can assume the user has access to its domain once any specific request which proves access can be fulfilled by the user. There's no real way to fool the system except doing some DNS-magic, or gaining entry to the webserver running on the domain, which is out of your control anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With