How Can I Log Into a Web Forms Website Before Parsing with Simple HTML Dom Parser? How Can I Log Into a Web Forms Website Before Parsing with Simple HTML Dom Parser? curl curl

How Can I Log Into a Web Forms Website Before Parsing with Simple HTML Dom Parser?


Try this one.

include('simple_html_dom.php');$context = stream_context_create(array('http' => array('header' => 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17')));$html = str_get_html( file_get_contents('http://page.com/user1', false, $context) );