Remote file upload help needed

后端 未结 2 1233
深忆病人
深忆病人 2020-12-16 06:20

This is my normal file upload code.

HTML

相关标签:
2条回答
  • 2020-12-16 06:39

    You're trying to make remote upload but wihthout option to reupload it to your server? Why don't you just send your form to your uploading place & proccess it there? It's fastest and the best solution..

    0 讨论(0)
  • 2020-12-16 07:00

    Try this:

    $ch = curl_init("http://www.remotepage.com/upload.php"); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CUROPT_POSTFIELDS, array('fileupload' => '@'.$_FILES['theFile']['tmp_name'])); 
    echo curl_exec($ch); 
    
    0 讨论(0)
提交回复
热议问题