I have a guestbook on one of my sites where the entires are formatted to be
x pixles in width. Now the text is input and output from a "blob" field
from a database... but when people input long URL's into their entries, the
formatting of the page is ruined.
Can anyone suggest a way for PHP to "read through" the text and substitute
a URL with a short text link, but still keeping the URL so it's clickable?
From my observations, the URL's may or may not (usually not) have the
prefix http://.
All I can think of is for PHP to count how many consecutive characters
there are before a "space" character, and substitute if it's over x
characters in length. But I don't know if this is possible.
Would prefer suggestions how to do it rather than actual code (I want some
challenge after all).
Thanks.
Dariusz