Can anyone offer some direction on how to achieve a programmatic POST request?
I have developed a module which needs to send data to an external URL as part of it's functionality.
To achieve that, I am using the following code:
drupal_goto("https://external.secure.co.uk", array(
'query' => array(
'nid'=>$submission->nid,
'sid'=>$submission->sid
),
));
This works successfully and redirects my users to the following url:
https://external.secure.co.uk?nid=271&sid=57
The only issue is my data is sent as a GET request. For security reasons I need to find a solution which will allow me to send the data in a POST request.