in php how do I use preg replace to turn a url into a tinyurl
- by Steven
I need to convert a string of text containing a long url into the same string but with a tinyurl (using the tinyurl api). eg. convert "blah blah blah /http://example.com/news/sport blah blah blah" into "blah blah blah http://tinyurl.com/yaeocnv blah blah blah".
How can it be done? PLEASE NOTE I added a slash before the long url as I'm only allowed to post one link