I need help.

Hell389

BANNED
Joined
Jun 18, 2009
Messages
115
Reaction score
13
Hello,

Anyone know how to turn text link into live links ? I know there is a php code for this but I can't find it.

Can you please help.

Thanks
 
Huh? You mean like a <href "link" or I completely missed the boat on this one lol
 
preg_match to identify if its a link, str_replace or preg_replace to make it a link. Google is your friend! :)
 
Just like when you put link on youtube, the text link becomes live links without putting <a href=" for each url.

If u can help, thanks.
 
preg_match to identify if its a link, str_replace or preg_replace to make it a link. Google is your friend! :)

Hey, if possible, can u please give me the code, google is my best friend but php isn't.:)
 
No man, that's not what I want.I have list of text urls, its big list so I can't do <a href= for all individually.I want a script that will turn text links into live links automatically.

Really appreciate someone who can help.
 
Use Front any HTML editor, front page if free with XP, why download adobe for such a small thing, any free HTML editor will do.
Just highlight each code and press the coding button, in my knowledge this is the way...
 
Last edited:
from what I understand he have a text file with links , he wanna make them links on html file :) ... well I think you can do faster with excel , put on col A <href= / col B the url in text format /col C rest of the things ... :) select all / copy all / paste all into new notepad , remove the formatting :)
 
see, when u post a link on a forum like -> http://www.google.com

I did not add the "a" tag but the the text is still clickable, the vbulletin (and all other forum apps) posting module changed all links in your post to clickable whether you make them like that or not. The code which they use is what he wanted.

I believe thats what he wanted but I can of course be wrong....
 
No man, that's not what I want.I have list of text urls, its big list so I can't do <a href= for all individually.I want a script that will turn text links into live links automatically.

Something like this should work. (Not tested though)
Code:
<?php  

$urlList="http://www.blackhatworld.com
http://www.google.com
http://www.yahoo.com
http://www.some.other.site/";

$urlArray = split("\n", $urlList);

foreach($urlArray as $urlLine)
{
	echo "<a href=\"" . trim($urlLine) . "\">" . trim($urlLine) . "</a>\n";
}

?>

Run in browser and view source code to get your new list of live links.


If that's what your looking for, a lot of confusion in this thread:confused:
 
Back
Top