- simplexml_load_string: documentation ( source)
- strstr: documentation ( source)
<?php
$html = '$this->data[0],$this->data[1],$this->data[2]<br><br>$graph->addData($this->data[0],$this->data[1],$this->data[2]);<br><?xml version="1.0"?>
<phpgrahphlib>
<imageName>230_0046831d980a56de52331b09b7eb7efc.png</imageName>
<imageLocation>http://www.ebrueggeman.com/sites/www.ebrueggeman.com/files/phpgraphlib_api/230_0046831d980a56de52331b09b7eb7efc.png</imageLocation>
<imageTag><![CDATA[<img width="500" height="350" src="http://www.ebrueggeman.com/sites/www.ebrueggeman.com/files/phpgraphlib_api/230_0046831d980a56de52331b09b7eb7efc.png" />]]></imageTag>
<error></error>
<version>2.30</version>
</phpgrahphlib>';
$target = strstr($html, '<?');
$xml_object = simplexml_load_string($target);
echo 'Image Tag: '. $xml_object->imageTag.PHP_EOL;
echo 'Errors: '. $xml_object->error.PHP_EOL;