PDA

Click to See Complete Forum and Search --> : URL TO [url]URL[/URL]


prokhaled
Aug 22nd, 2002, 12:58 PM
How Can I convert URL like "www.site.com" or like "http://www.site.com" to "(url)http://www.site.com(/url)"

Provide that : there is at least one space before and after url.

for example(s):
_______________
$text="go here http://www.anysite.com please";

output:
$text="go here (url)http://www.anysite.com(/url) please";


_______________
$text="go here (http://www.anysite.com please";

output:
$text="go here (http://www.anysite.com please";

no effect because there is no any spaces befor url.




__________________

The Hobo
Aug 22nd, 2002, 01:44 PM
Haven't we written enough of your project for you?

Kagey
Aug 27th, 2002, 12:10 PM
why is this guy trying to create a bulletin board system when he doesnt even know any basic fundementals of programming?

it boggles the mind.

prokhaled
Aug 27th, 2002, 12:24 PM
Why not if I can do that. and I'm almost finished it , and it's free and I will make an english copy of it near for all.

about code I write I now , thanks for help.

That is the code that I write it

$Signature = eregi_replace("[^src=\"](http://(([A-Za-z0-9~&=;\?%_#./\-])*)([a-zA-Z0-9/]))", " \\1",$Signature);
$Signature = eregi_replace("[^http://](www\.(([A-Za-z0-9~&=;\?%_#./\-])*)([a-zA-Z0-9/]))", " \\1 (http://\\1)",$Signature);