curl-to-php
curl-to-php copied to clipboard
-T not supported
curl -T foo.txt ... isn't supported
Here is one example:
$f1 = fopen('message.txt', 'r');
$r1 = curl_init('smtps://smtp.gmail.com');
curl_setopt($r1, CURLOPT_MAIL_RCPT, ['[email protected]']);
curl_setopt($r1, CURLOPT_NETRC, true);
curl_setopt($r1, CURLOPT_READDATA, $f1);
curl_setopt($r1, CURLOPT_UPLOAD, true);
curl_exec($r1);
curl -X PUT -H 'Content-Type: video/mp4'
-H "Content-Length: 8036821"
-T "/Users/kenh/Downloads/amazing_race.mp4"
"URL"
Kindly help me translating this -T to php . Have tried infile, infilesize but failed.