I need to attach a pdf file form local drive and post it to the API using PHP CURL.

Here is the [RingCentral FaxOut API Documentation](https://service.ringcentral.com/faxoutapi/)

```
$url = "https://service.ringcentral.com/faxapi.asp";

$data = array(

    'Username' => 'XXXXXXXXX', 
    'Password' => 'XXXXXXXXX',
    'Recipient' => 'XXXXXXXXXX|Navneet',
    'Coverpage' => 'Default',
    'Coverpagetext' => 'Testing Faxout API ',
    'Resolution' => 'High',
    "Sendtime"   => date('d:m:y H:i:s'),
    'Attachment' => file_get_contents(PATH_TO_FILE)

);

curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch,CURLOPT_POST, count($data));
curl_setopt($ch,CURLOPT_POSTFIELDS, $data);

$result = curl_exec($ch);

```

API do not return anything in response. I think, I'm not sending the attachment properly. The attachment should be in binary stream. I tried base64\_encode but no success. 

As given in the Request body example, header for attachment should be like this 

```
Content-Disposition: form-data; name="Attachment"; filename="C:\example.doc" 
<Document content is here>
-----------------------------7d54b1fee05aa

```