Something
public text v1 · immutable<?php
$_GET['url'] = array_map('trim', split("[\r\n]", $_POST['urls']));
function hyperlink($text) {
// match protocol://address/path/file.extension?some=variable&another=asf%
$text = preg_replace("/([a-zA-Z]+:\/\/[a-z0-9\_\.\-]+".
"[a-z]{2,6}[a-zA-Z0-9\/\*\-\?\_\&\%\=\,\.]+)/",
" <a href=\"$1\" target=\"_blank\">$1</a>", $text);
return $text;
}
foreach ($_GET['url'] as $url) echo hyperlink($url);
?>