'picture2', 'pict' => $filedata, 'username' => 'type_your_username_here', 'password' => 'type_your_password_here'); $ch = curl_init(); $options = array( CURLOPT_URL => $url, CURLOPT_HEADER => true, CURLOPT_POST => 1, CURLOPT_HTTPHEADER => $headers, CURLOPT_POSTFIELDS => $postfields, CURLOPT_RETURNTRANSFER => true ); // cURL options curl_setopt_array($ch, $options); $response = curl_exec($ch); echo "
";
        echo $response;
        echo "
"; if(!curl_errno($ch)) { $info = curl_getinfo($ch); if ($info['http_code'] == 200) $errmsg = "File uploaded successfully"; } else { $errmsg = curl_error($ch); } curl_close($ch); } } else { // form to upload image echo '
'; echo 'Select image to upload:'; echo ''; echo ''; echo '
'; } ?>