$live_m = get_match('/<li>(.*)Live<\/a><\/li>/',$html); $html = str_replace('<li>' . $live_m . 'Live</a></li>', '', $html);
<?php $url = 'http://www.website.com'; $ch = curl_init(); curl_setopt($ch, CURLOPT_USERAGENT, 'Firefox (WindowsXP) - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6'); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_TIMEOUT, 30); $html= curl_exec($ch); if (!$html) { echo "<br />cURL error number:" .curl_errno($ch); echo "<br />cURL error:" . curl_error($ch); exit; } $live_m = get_match('/<li>(.*)Live<\/a><\/li>/',$html); $html = str_replace('<li>' . $live_m . 'Live</a></li>', '', $html); echo $html;?>