ram0ng1 I use CURL for mine. An example here
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://discuss.infosecforge.io/api/discussions');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 99999999);
curl_setopt($ch, CURLOPT_POSTFIELDS,
json_encode((array('data' => array(
'type' => "discussions",
'attributes' => array(
'title' => $subject,
'content' => $body
),
'relationships' => array('tags' => array('data' => array(array(
'type' => 'tags',
'id' => "23"
))))
)))));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // On dev server only!
$result = curl_exec($ch);
It's taken from my parser script I mentioned that uses Laravel's IMAP library to retrieve data from an email newsfeed I have, then publishes it to the forum. A final example is here https://discuss.infosecforge.io/t/news