You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
GeekQu_sspanel/app/Utils/DNSoverHTTPS.php

19 lines
364 B
PHTML

8 years ago
<?php
/**
* Created by PhpStorm.
* User: rico93
* Date: 2019/1/26
* Time: 12:22
*/
namespace App\Utils;
use RemotelyLiving\PHPDNS\Resolvers\GoogleDNS;
class DNSoverHTTPS
{
public static function gethostbyName($hostname){
$resolver = new GoogleDNS();
return $resolver->getARecords($hostname)->pickFirst()->toArray()["IPAddress"];
}
}