| Server IP : 91.240.85.141 / Your IP : 216.73.216.223 Web Server : nginx/1.28.0 System : Linux nuevo.ru 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : ( 1029) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/wpface_ru_usr/data/www/wpface.ru/wp-content/plugins/seo-tools/ |
Upload File : |
<?php
/*
Plugin Name: Whois
Description: Этот плагин добавляет шорткод для вывода Whois".
Version: 1.0
Author: wpFace
*/
require_once 'vendor/autoload.php';
use Iodev\Whois\Factory;
function custom_whois_shortcode() {
if(isset($_POST['site'])){
$output = '';
$site = $_POST['site'];
// Creating default configured client
$whois = Factory::get()->createWhois();
// Supports Unicode (converts to punycode)
if ($whois->isDomainAvailable("$site")) {
$isDomainAvailable = true;
$output = '<p style="color: #76cd28;">Домен свободен и может быть зарегистрирован!</p>';
} else {
$isDomainAvailable = false;
$response = $whois->lookupDomain("$site");
$output = nl2br($response->text);
}
// Возвращаем результат как HTML
return '<div class="whois-result">' . $output . '</div>';
}
}
add_shortcode('custom_whois', 'custom_whois_shortcode');