Hello
Need a help
How to parse file_get_content into an array?
<?php
include_once('get_data.php');//simple_html_dom.php
$postdata = http_build_query(
array(
'id' => 'xxx',
)
);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://localhost/test.php', false, $context);
I want only get a text that in attribute <div id="console"> YYYY </div> based on $result
text that i expect is YYYY
thank in advance