I am trying to transfer two files via PHP using cURL. I know the methodology via the command line would be
curl -T "{file1,file2,..filex}" ftp://ftp.example.com/ -u username:password
And within php you can upload 1 file via the following code
$ch = curl_init();
$localfile = "somefile";
$username = "Someusername@someserver.com";
$password = "somerandomhash";
$fp = fopen($localfile, 'r');
curl_setopt($ch, CURLOPT_URL, "ftp://ftp.domain.com/");
curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass");
curl_setopt($ch, CURLOPT_UPLOAD, 1);
curl_setopt($ch, CURLOPT_INFILE, $fp);
curl_setopt($ch, CURLOPT_INFILESIZE, filesize($localfile));
curl_exec ($ch);
$error_no = curl_errno($ch);
curl_close ($ch);
But how would I do multiple files using the above methodology?