hazaveh / verify-domain
Verify Domain Ownership with PHP
Installs: 1 503
Dependents: 1
Suggesters: 0
Security: 0
Stars: 23
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >=5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.30
- pestphp/pest: ^2.19
This package is auto-updated.
Last update: 2024-11-14 11:05:11 UTC
README
VERIFY DOMAIN
PHP Verify Domain lets you verify the ownership of a domain by validating uploaded File Content, Meta Tags and TXT DNS records. You might have seen similar behaviour when verifying your domain in services like "Google Search Console" and ...
You can learn more about Verify Domain package in this blog post.
This library is compatible with php > 5 and has almost zero runtime dependency.
Installation
Simply run via composer:
composer require hazaveh/verify-domain
Usage
Simply instantiate the VerifyDomain Class or inject it using your DI container.
use Hazaveh\VerifyDomain\VerifyDomain; $verify = new VerifyDomain(); /** * Verifies if a TXT record with the value of "php-is-awesome" exists. */ $byDNS = $verify->verifyByDNS('hazaveh.net', 'php-is-awesome'); /** * Verifies "https://hazaveh.net/verification.txt" with the content of "php-is-awesome" exists. */ $byFile = $verify->verifyByFile("hazaveh.net", 'verification.txt', "php-is-awesome"); /** * Verifies '<meta name="verification" content="verification-code-123">' exists on hazaveh.net */ $byMeta = $verify->verifyByMeta("hazaveh.net", 'verification', "verification-code-123");
Contribution
Add something cool or fix a broken cup, run the tests and create a PR ❤️🚀