I don't see why you wouldn't want to use str_replace()
, this seems like the perfect remedy for me.
Try the following
HTML - myURL.php
<html>
<body>
<div id="myDiv1">%cmsarea1%</div>
<div id="myDiv2">%cmsarea2%</div>
<div id="myDiv3">%cmsarea3%</div>
</body>
</html>
PHP - HTMLparse.php
$theContent = file_get_contents("myURL.php");
$var1 = $theContent.str_replace("%cmsarea1%", "My first variable");
$var2 = $theContent.str_replace("%cmsarea2%", "My second variable");
$var3 = $theContent.str_replace("%cmsarea3%", "My third variable");