i have successfully uploaded a file using CURL.
$uploaddir = realpath('./') . '/';
$uploadfile = $uploaddir . basename($_FILES['file_contents']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['file_contents']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.
";
} else {
echo "Possible file upload attack!
";
}
echo 'Here is some more debugging info:';
print_r($_FILES);
echo "
<hr />
";
print_r($_POST);
print "</pr" . "e>
";
But before uploading I want to check if the file is present and if present append to it. I can check if the file is present or not.How do I get the content of the file uploaded.