The documentation does not mention this as far as I can see it, but looking at the source code, I noticed that the function you are using takes the context of the stream as the third argument. You can create a mail request using this PHP function as follows:
$request = array( 'http' => array( 'method' => 'POST', 'content' => http_build_query(array( 'Item' => 'Value', 'Item2' => 'Value2' )), ) ); $context = stream_context_create($request); $html = file_get_html('http://www.google.com', false, $context);
If you do not like contexts or prefer another method (for example, the cURL extension), you can also simply extract the contents of the page using it, then feed it to the parser using str_get_html() or $parser->load() ; the class itself does pretty much the same thing inside the method you are using right now.
source share