本文整理汇总了PHP中bbcode::highlight_url方法的典型用法代码示例。如果您正苦于以下问题:PHP bbcode::highlight_url方法的具体用法?PHP bbcode::highlight_url怎么用?PHP bbcode::highlight_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bbcode
的用法示例。
在下文中一共展示了bbcode::highlight_url方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
@fclose($fsk);
}
$match = array();
if (preg_match('#ReferralServer: whois://(.+)#im', $ipwhois, $match)) {
if (strpos($match[1], ':') !== false) {
$pos = strrpos($match[1], ':');
$server = substr($match[1], 0, $pos);
$port = (int) substr($match[1], $pos + 1);
unset($pos);
} else {
$server = $match[1];
$port = 43;
}
$buffer = '';
if ($fsk = @fsockopen($server, $port)) {
fputs($fsk, "{$ip}\r\n");
while (!feof($fsk)) {
$buffer .= fgets($fsk, 1024);
}
@fclose($fsk);
}
$ipwhois = empty($buffer) ? $ipwhois : $buffer;
}
$array = array('%' => '#', 'inetnum:' => '<strong class="red">inetnum:</strong>', 'netname:' => '<strong class="green">netname:</strong>', 'descr:' => '<strong class="red">descr:</strong>', 'country:' => '<strong class="red">country:</strong>', 'admin-c:' => '<strong class="gray">admin-c:</strong>', 'tech-c:' => '<strong class="gray">tech-c:</strong>', 'status:' => '<strong class="gray">status:</strong>', 'mnt-by:' => '<strong class="gray">mnt-by:</strong>', 'mnt-lower:' => '<strong class="gray">mnt-lower:</strong>', 'mnt-routes:' => '<strong class="gray">mnt-routes:</strong>', 'source:' => '<strong class="gray">source:</strong>', 'role:' => '<strong class="gray">role:</strong>', 'address:' => '<strong class="green">address:</strong>', 'e-mail:' => '<strong class="green">e-mail:</strong>', 'nic-hdl:' => '<strong class="gray">nic-hdl:</strong>', 'org:' => '<strong class="gray">org:</strong>', 'person:' => '<strong class="green">person:</strong>', 'phone:' => '<strong class="green">phone:</strong>', 'remarks:' => '<strong class="gray">remarks:</strong>', 'route:' => '<strong class="red"><b>route:</b></strong>', 'origin:' => '<strong class="gray">origin:</strong>', 'organisation:' => '<strong class="gray">organisation:</strong>', 'org-name:' => '<strong class="red"><b>org-name:</b></strong>', 'org-type:' => '<strong class="gray">org-type:</strong>', 'abuse-mailbox:' => '<strong class="red"><b>abuse-mailbox:</b></strong>', 'mnt-ref:' => '<strong class="gray">mnt-ref:</strong>', 'fax-no:' => '<strong class="green">fax-no:</strong>', 'NetType:' => '<strong class="gray">NetType:</strong>', 'Comment:' => '<strong class="gray">Comment:</strong>');
$ipwhois = trim(bbcode::highlight_url(htmlspecialchars($ipwhois)));
$ipwhois = strtr($ipwhois, $array);
} else {
$ipwhois = $lng['error_wrong_data'];
}
echo '<div class="menu"><small>' . nl2br($ipwhois) . '</small></div>' . '<div class="phdr"><a href="' . htmlspecialchars($_SERVER['HTTP_REFERER']) . '">' . $lng['back'] . '</a></div>';