curl でいくつかの html コードを解析しています。次のようなサイトのhtmlソース:
<div id="content">
some words
</div>
<?
$box_social['dimensioni']="80";
$box_vota=array();
$box_vota["novideo"]='';
$box_vota["nofoto"]='';
$box_vota["id_articolo"]='1003691';
include($_SERVER['DOCUMENT_ROOT']."/incs/box_social.php");
?>
<div id="footer">
some words
</div>
HTMLソースからPHPの短いタグを削除するには? 私は欲しい
<div id="content">
some words
</div>
<div id="footer">
some words
</div>
を使用preg_replace('/<\?(.*?)\?>/','',$html);
していますが、php の短いタグの部分がまだ残っています。