Dear group members,

I want to upload a file onto the server but don't want to use the help
of forms. I want to do the
same from opening the conenction from command line and do everything
from there on.

Here is my header info

POST /fileupload.php HTTP/1.1
User-Agent: Mozilla/5.0
Host: xx.xx.xx.xx
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Disposition: attachment; userfile=A.h
Content-length: 81

Where fileupad.php looks like ******************
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used
instead
// of $_FILES.

$uploaddir = '/var/www/uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

echo '
';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

print "
";

?>
************************************************** ****

What I noticed that the execution of the file does not get triggered
when I send the above
header and corresponding data. It only triggers when I upload the
"fileupload.php" page from
the browser.

I am missing one step and can not figure out what it is to get this
code triggered. BTW. This
code was copied from web site and works fine with form type data.

Can someone help me in discovering the missing step.

Thanks in advance.

nagrik