- file_get_contents: documentation ( source)
- simplexml_load_string: documentation ( source)
<?php
$a= file_get_contents("http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true");
$xml=simplexml_load_string($a);
foreach($xml->xpath('doc[starts-with(str)]') as $child)
{
echo $child->str;
}
?>