PHP code example of hazaveh / verify-domain

1. Go to this page and download the library: Download hazaveh/verify-domain library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hazaveh / verify-domain example snippets


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");