Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
"/.*free-date:.*?(\d*\.\d*\.\d*)/si"
<?php
function readDomain($domain,$server)
{
$con = fsockopen($server, 43);
if (!$con) return false;
fputs($con, $domain."\r\n");
$response = ' :';
while(!feof($con)) {
$response .= fgets($con,128);
}
fclose($con);
return $response;
}
$domain = 'yandex.ru';
$server = 'whois.tcinet.ru';
$whois_output = readDomain($domain,$server);
preg_match('/paid-till:\s*([\d-\.]*)/', $whois_output, $paidtill);
if(isset($paidtill[1]))
echo 'paid-till: '.$paidtill[1].'<br>';
preg_match('/free-date:\s*([\d-\.]*)/', $whois_output, $freedate);
if(isset($freedate[1]))
echo 'free-date: '.$freedate[1].'<br>';
echo '<pre>'.$whois_output;