コード例 #1
0
ファイル: example.php プロジェクト: vortexacm/acmback
<?php

include 'Whois.php';
$w = new Whois();
echo '<pre>';
//print_r($w->query('przeslij.pl'));
//print_r($w->query('de77.com'));
//print_r($w->query('meinkaetzchen.de'));
//print_r($w->query('shop.fr'));
//print_r($w->query('wikipedia.org'));
//print_r($w->query('shop.net'));
//print_r($w->query('google.net'));
print_r($w->query('google.com'));
コード例 #2
0
    $domain = "hello.com";
} else {
    $domain = $_GET['domain'];
}
$domain = str_replace("http://", "", $domain);
$domain = str_replace("https://", "", $domain);
$domain = str_replace("www.", "", $domain);
$domain = explode("/", $domain, 2)[0];
$domain = strtolower($domain);
$domain = htmlspecialchars($domain);
if (empty($_GET['type'])) {
    $type = "array";
} else {
    $type = htmlspecialchars($_GET['type']);
}
$whoisResult = $whoisClass->query($domain);
if (!is_array($whoisResult)) {
    if (mb_substr($whoisResult, 0, 3) == "++[") {
        die($whoisResult);
    }
} else {
    switch ($type) {
        case "json":
            $jsonResult = json_encode($whoisResult);
            echo $jsonResult;
            break;
        case "text":
            $textResult = $whoisClass->query($domain, 'text');
            echo $textResult;
            break;
        default: