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.
19 lines
364 B
PHP
19 lines
364 B
PHP
<?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"];
|
|
}
|
|
}
|