View Single Post
Old 07-07-2006, 01:06 AM   #9 (permalink)
GoWFB_SEO
Member
 
GoWFB_SEO's Avatar
 
Join Date: 06-01-06
Posts: 70
iTrader: 0 / 0%
Latest Blog:
None

GoWFB_SEO is liked by many
Send a message via MSN to GoWFB_SEO
Quote:
Originally Posted by helloworld
Code:
<?php //check what?? could possibly use a $GET_['text'] to change a form // $input = "http://www.yahoo.com is a great place to visit"; ///change it/// $input = trim($input); $input = htmlspecialchars($input); $input = preg_replace('#(.*)\@(.*)\.(.*)#','<a href="mailto:\\1@\\2.\\3">Email</a>',$input); $input = preg_replace('=([^\s]*)(www.)([^\s]*)=','<a href="http://\\2\\3" target=\'_new\'>\\2\\3</a>',$input); //echo modified input// echo "$input"; ?>
This code will do

IE:

http://www.yahoo.com
www.yahoo.com
you@yahoo.com "converted to a mailto that says email"

what it will not do is,

http://yahoo.com

hope it helps, just didn't have much time today
thanks a lot, helloworld!! you really gave me a lot of help and i really appreciated it

just have one unswered question here,
for that upper level directory, i tried to use "../", but it seems still does not work
GoWFB_SEO is offline   Reply With Quote