A couple of months ago I needed some PHP code to create links from plain text.
It took a while to find the right stuff but what I found was a script that needed quite a bit of work.
The fruit of my labor was this function that will take plain text URLs like http://www.croncast.com and turn them into http://www.croncast.com.
To use this function:
1. Take your copy, say $copy = "Lorem ipsum http://www.croncast.com"; and feed it to the function like so, echo makeURL($copy)
2. Output would be "Lorem ipsum http://www.croncast.com"
|