Curl funtion error

this is my code, it is work localhost or any ftp but exeoutput not work

function fileUploader($file_tmp, $file_type, $file_name) {
global $MAIN_URL;
global $newFileName;

$ch = curl_init();
$cfile = new CURLFile($file_tmp, $file_type, $file_name);
$data = array('filename' => $newFileName, 'myfile' => $cfile);

curl_setopt($ch, CURLOPT_URL, $MAIN_URL.'file_upload.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_close ($ch);


first i tryed upload local file to server but not work, and i recreated my script like this and also this is not work

Make sure you have enabled PHP CURL extensions and included the OpenSSL/DLL too (see doc).