Considering I don't want to use curl, which is a valid alternative to make a post request? Maybe Zend_http_client
?
I just need the basic stuff (I need to request an url with only one post param)
you can use stream_context_create and file_get_contents
<?php
$context_options = array (
'http' => array (
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
. "Content-Length: " . strlen($data) . "\r\n",
'content' => $data
)
);
?>
$context = stream_context_create($context_options);
$result = file_get_contents('http://www.php.net', false, $context);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With