exact IP addresses in PHP and turn them into a hyper link

function scan_ips($text)
{
$text = preg_replace('/([0-9]+\\.[0-9]+\\.[0-9]+)\\.[0-9]+/', '<a href=\'http://james.s.com/?ip=\0\'>\0</a>', $text);
return $text;
}

Leave a Reply

Your email address will not be published. Required fields are marked *


9 − = five

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>