Is it possible to convert this curl command to PHP?
curl -F file=@filename https://any.website.com/
Is it possible to convert this curl command to PHP?
curl -F file=@filename https://any.website.com/
Try With:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://any.website.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);