Actually I want to read the contents that come after the search query, when it is done. The problem is that the URL only accepts POST
methods, and it does not t
The better way of sending GET
or POST
requests with PHP
is as below:
setOptions(array('cookies' => array('lang' => 'de')));
$r->addPostFields(array('user' => 'mike', 'pass' => 's3c|r3t'));
try {
echo $r->send()->getBody();
} catch (HttpException $ex) {
echo $ex;
}
?>
The code is taken from official documentation here http://docs.php.net/manual/da/httprequest.send.php