$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, "Content-Type: multipart/form-data;charset=utf-8");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "chat_id=$chatId&document=$document");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch);
curl_close ($ch);
var_dump($output); // show output
This returning
{"ok":false,"error_code":400,"description":"Bad Request: wrong file identifier/HTTP URL specified"}"
Is anything I did wrong?
This error is usually due to the file name. Rename the file.
Обсуждают сегодня