help with sending the image here:

enter image description here

I do this:

$imga = '1.jpg'; ///Картинка $file = new CURLFile(realpath("$imga")); ///Загружаем картинку $ch = curl_init('https://s.taobao.com/image'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, array('filename' => $file,'name'=>'imgfile',)); $data = curl_exec($ch); curl_close($ch); print_r($data); 

enter image description here

I get error:

enter image description here

and should receive:

enter image description here

what am I doing wrong.

  • Add an error message with text, not a picture. - VenZell
  • Actually, the browser is sending dofig headers - Alex78191
  • Translate the error, maybe there is something useful. - Ivan Bolnikh

0