Skip to content

API krisp_search

JoungKyun Kim edited this page Jul 17, 2016 · 9 revisions

SYNOPSIS

(stdClass object) KRISP::search ((string) $host)
(stdClass object) krisp_search ((krisp) $link, (string) $host)

$link

Return value of the krisp_open api. This argument is only required on Procedural style.

$host

Searching host or IP address

DESCRIPTION

Returns network information that includes network information, country information and ISP information about given host .

Basically, this method search at krisp table. If you want to search at other table, you can use KRISP::searchEx method.

RETURN VALUE

return stdClass object that include follow members:

stdClass Object
(
    [host] => naver.com
    [ip] => 125.209.222.142
    [start] => 125.209.192.0
    [end] => 125.209.255.255
    [netmask] => 255.255.192.0
    [network] => 125.209.192.0
    [broadcast] => 125.209.255.255
    [icode] => NHN-NET
    [iname] => 네이버비즈니스플랫폼 주식회사
    [ccode] => KR
    [cname] => Korea, Republic of
)

EXAMPLE

Object oriented style

<?php
$kr = new KRISP;
$r = $kr->search ('naver.com');
print_r ($r);
$kr->close ();
?>

Procedural style

<?php
if ( ($kr = krisp_open (null, $error)) === false ) {
    echo "ERROR: {$error}\n";
    exit (1);
}
$r = krisp_search ($rk, 'naver.com');
print_r ($r);
krisp_close ($kr);
?>

See Also

KRISP::__construct, KRISP::close, KRISP::searchEx, KRISP::mtimeInterval, KRISP::debug