Re: [PHP] Converting URL's to hyperlinks.

2009-09-08 Thread Lupus Michaelis
Sorry for the lag. Daevid Vincent a écrit : OP ? Original Poster Thanks :) Blah blah blah. I've used this code for about 6 years now and have yet to find emails that it didn't work for. If someone has some funky (whacky) RFC extremity, then so be it. That's their problem. Most

Re: [PHP] Converting URL's to hyperlinks.

2009-09-08 Thread Paul M Foster
On Wed, Sep 09, 2009 at 03:22:25AM +0200, Lupus Michaelis wrote: Sorry for the lag. Daevid Vincent a écrit : OP ? Original Poster Thanks :) Blah blah blah. I've used this code for about 6 years now and have yet to find emails that it didn't work for. If someone has some funky

Re: [PHP] Converting URL's to hyperlinks.

2009-09-04 Thread Lupus Michaelis
Daevid Vincent a écrit : Maybe I misunderstood the OP, OP ? but wouldn't this (or something like it) be easier and cleaner than that mess below?? No, it's dirty too. $url = preg_replace(/(\...@\w+\.[a-za-z]{2,3})/i, a href='mailto:$1'$1/a, $url); This violate the numerous RFC about

RE: [PHP] Converting URL's to hyperlinks.

2009-09-04 Thread Daevid Vincent
-Original Message- From: Lupus Michaelis [mailto:mickael+...@lupusmic.org] Sent: Friday, September 04, 2009 7:46 AM To: php-general@lists.php.net Subject: Re: [PHP] Converting URL's to hyperlinks. Daevid Vincent a écrit : Maybe I misunderstood the OP, OP ? Original

Re: [PHP] Converting URL's to hyperlinks.

2009-09-04 Thread Tom Chubb
2009/9/4 Daevid Vincent dae...@daevid.com -Original Message- From: Lupus Michaelis [mailto:mickael+...@lupusmic.orgmickael%2b...@lupusmic.org ] Sent: Friday, September 04, 2009 7:46 AM To: php-general@lists.php.net Subject: Re: [PHP] Converting URL's to hyperlinks

RE: [PHP] Converting URL's to hyperlinks.

2009-09-02 Thread Daevid Vincent
='_blank'$2/a, $url); -Original Message- From: Nisse Engström [mailto:news.nospam.0ixbt...@luden.se] Sent: Saturday, August 29, 2009 1:46 PM To: php-general@lists.php.net Subject: Re: [PHP] Converting URL's to hyperlinks. On Fri, 28 Aug 2009 17:22:20 -0600, LinuxManMikeC wrote

Re: [PHP] Converting URL's to hyperlinks.

2009-08-29 Thread Eric
- Original Message - From: John Meyer johnme...@pueblocomputing.com To: php-general@lists.php.net Sent: Friday, August 28, 2009 1:56 AM Subject: [PHP] Converting URL's to hyperlinks. What sort of function would I need if I wanted to convert those URLs from plain jane text? You

Re: [PHP] Converting URL's to hyperlinks.

2009-08-29 Thread Nisse Engström
On Fri, 28 Aug 2009 17:22:20 -0600, LinuxManMikeC wrote: a href=?php echo $url; ?click here/a *Groan* Throw any random web site to an HTML validator and you're likely to see this kind of slop all over. The correct solution is of course: $u = htmlspecialchars ($url); echo a href=\$u\$u/a;

Re: [PHP] Converting URL's to hyperlinks.

2009-08-29 Thread LinuxManMikeC
2009/8/29 Nisse Engström news.nospam.0ixbt...@luden.se: On Fri, 28 Aug 2009 17:22:20 -0600, LinuxManMikeC wrote: a href=?php echo $url; ?click here/a *Groan* Throw any random web site to an HTML validator and you're likely to see this kind of slop all over. The correct solution is of

Re: [PHP] Converting URL's to hyperlinks.

2009-08-29 Thread Nisse Engström
On Sat, 29 Aug 2009 16:19:05 -0600, LinuxManMikeC wrote: As for your more elaborate example, I'm sure that heredoc will validate nicely. It does. and rethink your code so you aren't processing the same data over and over again. I see this kind of slop all over. Touché! Would you believe

Re: [PHP] Converting URL's to hyperlinks.

2009-08-29 Thread LinuxManMikeC
2009/8/29 Nisse Engström news.nospam.0ixbt...@luden.se: On Sat, 29 Aug 2009 16:19:05 -0600, LinuxManMikeC wrote: As for your more elaborate example, I'm sure that heredoc will validate nicely. It does. Perhaps you haven't met a few good friends of mine. Their names are html, head, and

Re: [PHP] Converting URL's to hyperlinks.

2009-08-29 Thread Nisse Engström
On Sat, 29 Aug 2009 16:47:47 -0600, LinuxManMikeC wrote: 2009/8/29 Nisse Engström news.nospam.0ixbt...@luden.se: On Sat, 29 Aug 2009 16:19:05 -0600, LinuxManMikeC wrote: As for your more elaborate example, I'm sure that heredoc will validate nicely. It does. Perhaps you haven't met a

[PHP] Converting URL's to hyperlinks.

2009-08-28 Thread John Meyer
What sort of function would I need if I wanted to convert those URLs from plain jane text? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Converting URL's to hyperlinks.

2009-08-28 Thread LinuxManMikeC
If you have short php tags enabled, assuming you put the url in a variable called $url... a href=?=$url?click here/a otherwise... a href=?php echo $url; ?click here/a or a myriad of other ways... Depending if there are any special characters involved, there are a couple functions that would