I have tried to convert the curl command from https://incarnate.github.io/curl-to-php/ URL. but they are not giving me proper php code for that. Can you please help out.
curl -i -F account_id=12345 -F authhash=BKPda_T497AX4EjBsk3ttw9OcOzk -F [email protected] https://url/upload
I tried this code to convert into php code. but not getting proper output.
$cmd = "curl -i -F
account_id=12345 -F
authhash=BKPda_T497AX4EjBsk3ttw9OcOzk -F
[email protected]
https://url/upload";
exec($cmd,$result);
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://url/upload"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close ($ch);-F, which also implies aPOSTrequest), and get back HTTP headers (-i). The converter site completely disregards these details.