Jump to content

Archived

This topic is now archived and is closed to further replies.

Julian

How to convert keywords (from a .txt file) to URL links?

Recommended Posts

Hi Guys

I'm looking for a way I can convert keywords (from a .txt or whatever) to URL links.

e.g.  Like if I have "[color=red]computer[/color]" on the .txt file when the browser display this word on the page "[color=red]computer[/color]" will be a link to somewhere.

I've tried phpgiggle but it seems to be outdated and there's no support.

Any help will be highly appreciated.

Share this post


Link to post
Share on other sites
$m = "" . include("file.txt");
$m = str_replace("computer", "<a href=\"www.computers.com\">computer</a>", $m);
echo $m;

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.