]*alt=\"([^>]*)\"[^>]*>/",$page,$matches,PREG_SET_ORDER); foreach ($matches as $match) { $page = preg_replace($match[0],$match[1],$page); } $page = preg_replace("/]*>/i","image",$page); $page = preg_replace("/]*embed>/i","flash video",$page); //preg_match_all("//i",$page,$matches,PREG_SET_ORDER); //print_r($matches); //exit; $page = preg_replace("//i","flash video",$page); $page = preg_replace("/]* /i","flash video",$page); echo $page; exit; */ $page = substr($page,strpos($page,"")); $page = substr($page,0,strpos($page,"
")+9); $page = str_replace("href=\"","href=\"http://www.onlysimchas.com/galleries/",$page); $page = preg_replace("/http:\/\/www.onlysimchas.com\/galleries\/index.cfm\?fuseaction=simchalist\&startrow=/i","?start=",$page); //get rid of top pic $page = str_replace("","",$page); //get rid of "GO" $page = preg_replace("/]*>]*>]*>Go<\/font><\/td>/i","",$page); //get rid of fonts $page = preg_replace("/]*>/i","",$page); $page = preg_replace("/<\/font>/i","",$page); //get rid of bgcolors $page = preg_replace("/bgcolor=\"[^\"]*\"/","",$page); //get rid of classes $page = preg_replace("/class=\"[^\"]*\"/","",$page); //get rid of date link and year preg_match_all("/]*>(\d+\/\d+\/\d\d\d\d)<\/a>/i",$page,$matches,PREG_SET_ORDER); foreach ($matches as $match) { $originaldate = $match[1]; $date = preg_replace("/\//","\\/",$originaldate); $page = preg_replace("/]*>$date<\/a>/i",substr($originaldate,0,strlen($originaldate)-5),$page); } //get rid of Birth/Engagment... link preg_match_all("/]*>(Aliyah|Bar Mitzvah|Bat Mitzvah|Birth|Bris|Engagement|Graduation|Henna|Pidyon HaBen|Simchat Bat|Torah Dedication|Upsherin|Wedding)<\/a>/i",$page,$matches,PREG_SET_ORDER); foreach ($matches as $match) { $page = preg_replace("/]*>$match[1]<\/a>/i",$match[1],$page); } //$page = explode("href=\"news.php3?id=",$page); //$output = ""; //foreach ($page as $part) //$output .= $part . "href=\"story.php?id="; //$output = substr($output,0,strpos($output,"")+9); echo $page; ?>