How to accept file through http from curl c program??

From: Date: Fri, 26 Sep 2003 10:25:21 +0000
Subject: How to accept file through http from curl c program??
Groups: php.general 
Request: Send a blank email to php-general+get-164020@lists.php.net to get a copy of this message
Hi there, Hopefully someone can shed some light for us on this. We have a client who is sending us a file through a C program which uses Curl. At our end we have a php script to accept the file passed through the form. This php script works fine using a browser however, it does not pick up what the C program sends to us. Our php is below, $_FILES contains zilch!! Any ideas?: foreach( $_FILES as $varname => $fileinfo ){ $filename = $fileinfo["name"]; $tmpname = $fileinfo["tmp_name"]; } $uploaddir = '/usr/local/nameofdir/; $uploadfile = $uploaddir. $_FILES['filename']['name']; if (move_uploaded_file($_FILES['filename']['tmp_name'], $uploadfile)) { $fp=fopen(brianLog1, "w+"); $string = "HTTPS POST of Purchase Order SUCCESSFUL.************ File Name: ".$_FILE['filename']['name']."\n"; fwrite($fp, $string); } else { $fp=fopen(brianLog2, "w+"); $string = "HTTPS POST Failed !************* File Name: ".$_FILES['filename']['name']."\nTmp Name: " ..$_FILES['filename']['tmp_name']; fwrite($fp, $string); } ?>

« previous php.general (#164020) next »