SrCn adlı üyeden alıntı: mesajı görüntüle
botumda içerik çektiğim karşı site içeriğin en alt kısmına link eklemiş.Her içerikte bu link değişiyor.Bunu nasıl temizleyebilirim ?
function ClearText ($text) {  
		$text = preg_replace( '/<div.+?>/', '', $text );  
        $text = preg_replace("'<script[^>]*>.*?</script>'si", '', $text );  
        $text = preg_replace( '/<!--.+?-->/', '', $text );
		$text = preg_replace( '/<iframe.+?>/', '', $text ); 
		$text = preg_replace( '/<a.+?>/', '', $text ); 
		$text = preg_replace( '/<p class.+?>/', '<p>', $text );
		$text = preg_replace( '/<p style.+?>/', '<p>', $text ); 
		$text = preg_replace( '/<span.+?>/', '', $text );  
		$text = preg_replace( '/<input.+?>/', '', $text );  
		$text = preg_replace( '/<textarea.+?>/', '', $text );  
		$text = preg_replace( '/<label.+?>/', '', $text );  
		$text = preg_replace( '/<legend.+?>/', '', $text );  
		$text = preg_replace( '/<ul.+?>/', '', $text );  
		$text = preg_replace( '/<li.+?>/', '', $text );  
		$text = preg_replace( '/<table.+?>/', '', $text );  
		$text = preg_replace( '/<tbody.+?>/', '', $text );  
		$text = preg_replace( '/<td.+?>/', '', $text );  
		$text = preg_replace( '/<th.+?>/', '', $text ); 
		$text = preg_replace( '/<tr.+?>/', '', $text );  
		$text = preg_replace( '/<em.+?>/', '', $text );  
		$text = preg_replace( '/<ins.+?>/', '', $text );  
		$text = preg_replace( '/<i.+?>/', '', $text ); 
		$text = preg_replace( '/<address.+?>/', '', $text );   
        $text = preg_replace( '/{.+?}/', '', $text );  
        $text = preg_replace( '/&nbsp;/', ' ', $text );  
        $text = preg_replace( '/&amp;/', ' ', $text );  
        $text = preg_replace( '/&quot;/', ' ', $text ); 
		$text = preg_replace( '/'/', ' ', $text );
		$text = preg_replace( '/’/', ' ', $text ); 
		 $text = str_replace(array('cihan.com.tr','aa.com.tr','iha.com.tr','CİHAN','AA','İHA','IHA','(DHA)','DHA','Haberin Devamı','</a>','<span>','</span>','</address>','</textarea>','</label>','</legend>','</ul>','</li>','</ins>','</table>','</tbody>','</th>','</td>','</tr>','</em>','</i>','</div>','</iframe>'), array(''), $text);
		return trim($text);
	}
buyur hocam linkleri ve diger gelen işe yaramaz html kodları temizler