I know very little about php and I'm limited to the basic altering of scripts. I have a script that replaces characters in urls. It stores information in a php file as opposed to a database. Basically it takes a url like http://www.somesite.com and creates a link from it using the url as the link text. What I would like to do is change the function as to where I can create the links with my own link text. Below are the functions used by the script.
$str = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\1" target="_blank">\\1</a>', $str);
$str = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a href="http://\\2" target="_blank">\\2</a>', $str);