|
Posted by gene.ellis on 12/23/05 00:49
so this is my regular expression:
$string_sep=preg_match_all('/(http:\/\/.+\.com)/',$page_content,$match,PREG_SET_ORDER);
for ($i = 0; $i<count($match); $i++) {
$url = $match[$i][0];
ereg('http:\/\/www\.(.*)\.com', $url, $out);
if ($out[1] != 'uctltc') {
// echo $url.'<br>';
$page_content =
ereg_replace("$url","javascript:launch('http://www.uctltc.org/common/opener.php?url=$url','window1')","$page_content");
}
}
It works! However, I need it to not only look through .com URLS, but be
open to the other extensions as well (.org, .net, .etc). And I want it
to only exampline hyperlink URLS, not image URLS, or any other sort of
URL. Thanks so much for your help! It is almost done!
Navigation:
[Reply to this message]
|