| AND OR | string words | *

string handling

|

autolink

| see demonstration of autolink


this script will detect URLs in a string and automatically create a link to this URL.
it removes the query-string and shows only the top-level of the site linked to as text.



full source of autolink [ line 1 - 5 ] | download autolink

1    <?
2   $txt '<p>this is a teststring with an url in it http://fundisom.com/phpsnippets/snip and its enough to be like that';
3   $txt preg_replace'/(http|ftp)+(s)?:(//)((w|.)+)(/)?(S+)?/i''<a href="">4</a>'$txt );
4   echo $txt;
5   ?>



41 hits by 24 users in the last 30 minutes.