improved html output
This commit is contained in:
parent
6f34e8987f
commit
067b2ee1f7
1 changed files with 3 additions and 1 deletions
|
@ -136,10 +136,12 @@ class utils extends Whois {
|
|||
function showHTML($result) {
|
||||
|
||||
$email_regex = "/([-_\w\.]+)(@)([-_\w\.]+)\b/i";
|
||||
|
||||
$html_regex = "/(?:^|\b)((((http|https|ftp):\/\/)|(www\.))([\w\.]+)([,:%#&\/?~=\w+\.-]+))(?:\b|$)/is";
|
||||
|
||||
$out = implode($result['rawdata'],"\n");
|
||||
|
||||
$out = preg_replace ($email_regex, '<a href="mailto:$0">$0</a>', $out);
|
||||
$out = preg_replace ($html_regex, '<a href="$1" target="_blank">$1</a>', $out);
|
||||
|
||||
if (isset($result['regrinfo']['domain']['nserver']))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue