Reputation: 3033
I have use following line to send files.
$curl_cmd = "/usr/bin/curl -k -d \"$post_data\" $url 2>/dev/null";
full Code:
$rec_name = $_POST['rec_name'];
$fax_no = $_POST['fax_no'];
$filename = $_FILES['attach']['name'];
$filedata = base64_encode(file_get_contents($_FILES['attach']['tmp_name']));
$post_data = "faxno=$fax_no&recipname=$rec_name&faxfilenames[0]=$filename&faxfiledata[0]=$filedata";
$curl_cmd = "/usr/bin/curl -k -d \"$post_data\" $url 2>/dev/null";
so the length of $post_data
is too big, beacause it is dependent of file data. if file is large the data is also too large.
so my quetion is what is the maximim limit of data send using this method?
Upvotes: 4
Views: 11091
Reputation: 58014
curl has no limit for this, but your shell has a limit for how long command lines you can use.
That limit depends on many factors so I can't tell you a specific value.
Upvotes: 1