$image_path = dirname(__FILE__).'/temp.jpg';
$cfile = curl_file_create($image_path,'image/jpeg','temp.jpg');
$ch = curl_init($urlImage);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, array("file" => $cfile));
$result = json_decode(curl_exec($ch), true);
curl_close($ch);