RE: [PHP] Adding HTTP URL Code

From: Date: Thu, 09 Jan 2003 12:57:53 +0000
Subject: RE: [PHP] Adding HTTP URL Code
Groups: php.general 
Request: Send a blank email to php-general+get-130931@lists.php.net to get a copy of this message
I found this in the archives of this list message title: php parsing problem with chat message number: 103717 by: Deadsam // // URL PARSER FOR MESSAGE $msg = ereg_replace ("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]]", "<font color=\"#FFFF00\"><u><a href=\"\\0\"target=\"_blank\">\\0</a></u></font>", $msg); //$msg = ereg_replace("\[url\]([^\[]+)\[/url\]", "<font color=\"#FFFF00\"><u><a href=\"\\1\"target=\"_blank\">\\1</a></u></font>", $msg); Might load the file in, do line by line search for this pattern if it passes then save it or do what you want. PSEUDO CODE Get File; Foreach file_line { if contains URL { do action; } } Close File; Robert Fisher Axis Solutions, Inc. __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com

« previous php.general (#130931) next »