HighSpeaker/test.php

35 lines
678 B
PHP
Raw Normal View History

2022-12-24 22:10:40 +08:00
<?php
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/support/bootstrap.php';
use Respect\Validation\Validator as v;
use yzh52521\EasyHttp\Response;
use yzh52521\EasyHttp\Http;
use yzh52521\EasyHttp\RequestException;
use GeoIp2\Database\Reader;
declare(ticks = 1);
function whoislookup($domain){
$whois = new Whois();
$query = $domain;
$result = $whois->Lookup($query,false);
echo '<pre>';
print_r($result);
echo '</pre>';
}
function sig()
{
throw new Exception;
}
try
{
pcntl_alarm(5);
pcntl_signal(SIGALRM, "sig");
whoislookup('layso.de');
pcntl_alarm(0);
}
catch(Exception $e)
{
echo "timeout\n";
}
2022-12-24 22:10:40 +08:00
?>