I am reading a source code of a page in PHP. There is an hidden input field <input type="hidden" name="session_id" value=
in that page.
$url = 'URL HERE';
$needle = '<input type="hidden" name="session_id" value=';
$contents = file_get_contents($url);
if(strpos($contents, $needle)!== false) {
echo 'found';
} else {
echo 'not found';
}
I want to read that hidden field value.