NogDog;10878627 wrote:<pre><?php
echo htmlspecialchars(file_get_contents('http://www.charles-reace.com/'));
?></pre>
wow: that's brilliant!
does exactly what i want.
i do need a small extra though.
within the html code, i need to miss out parts that are delimited by:
<!-- Admin Code Start -->
// I don't want this
// text to show
<!-- Admin Code End -->
i've taken your code and have tried this:
<?php
$rawPageCode = htmlspecialchars(file_get_contents('http://www.charles-reace.com/'));
$cleanPageCode = preg_replace("/<!--\s*Admin Code Start\s*-->.*?<!--\s*Admin Code End\s*-->/is", "", $rawPageCode);
$echo $cleanPageCode;
?>
this throws this error:
Parse error: syntax error, unexpected T_VARIABLE in /home/user/public_html/dirs/myPath/getSource.php on line 4
what am i doing wrong...? 🙁
thanks.