$url, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => array( 'file' => new CURLFile($file_path), // Attach the file 'FileName' => $file_name // Pass the filename parameter ), )); $start_time = microtime(true); // Execute the cURL request $response = curl_exec($curl); // Measure the end time $end_time = microtime(true); // Calculate the total time taken $total_time = $end_time - $start_time; // Check for errors if (curl_errno($curl)) { echo 'Error: ' . curl_error($curl); } else { // Print response echo $response . " \n"; echo "Total time: " . $total_time . " seconds\n"; } // Close cURL //php samplephpcall.php curl_close($curl); ?>