preg_replace PHP: If you post the code explaining what you need removed someone or myself will give you a better idea. preg_replace can find something and replace it with something else or nothing, even // so its not read.
Like I said if you post a snippet of code we can help you better. Anyway something like this, would remove for example the <title> name from google.com <?php $content = file_get_contents("http://www.google.com"); $final_page = preg_replace('#<title>(.*?)</title>#','<title></title>',$content); echo $final_page; ?> PHP: or in your case but I am not sure; This would comment out // a variable from been read <?php $content = file_get_contents("http://www.someWebSite.com"); $final_page = preg_replace('#$variable = "(.*?)";#','//$variable = "(.*?)";',$content); echo $final_page; ?> PHP:
Regexp for removing first line.... Easy way: <?php $data = file_get_contents('http://site.com/'); $wo_first_line = substr($data, strpos($data, "\n")); print $wo_first_line; ?> PHP: