Php upload image to remote server with cURL
问题 I would like to use cURL in php to upload an image to a remote image server. I have this piece of code, it's on the webserver: <form enctype="multipart/form-data" encoding="multipart/form-data" method="post" action="webform.php"> <input name="somevar" type=hidden value='.$somevar.'> <input name="uploadfile" type="file" value="choose"> <input type="submit" value="Upload"> </form> and: if (isset($_FILES['uploadfile']) ) { $filename = $_FILES['uploadfile']['tmp_name']; $handle = fopen($filename,