I need a code for take the link address that be in the email message body. Now i take message body in a variable and i can print that one on the screen. Now i need to take the link contained in it. Or otherwise need a code for converting that text file in t an html format . please help for doing this
+1
A:
you should use regular expression and use this to replace those links in your content
$body = preg_replace('!((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)!', '<a href="$1">$1</a>', $body);
for reference the manual of preg_replace
RageZ
2009-11-06 06:15:04
sir this one getting error.getting a warning "Warning: Unknown modifier 'f' in /e_drive/projects/testing/kiran/testaddon.php on line 76" and not getting the desired output
saif
2009-11-07 03:55:26
sorry I have to edit
RageZ
2009-11-07 05:08:59
Did you got any new idea. Still i can't find it
saif
2009-11-11 07:29:19