07-10-2006, 07:37 PM
IntPost is not working for me.
here is the page for manual upload:
http://www.nightchatter.com/upload.htm
uploader.php code
html upload form code
any idea ?
;;posts form with file field (userfile)
str s sr
s.getfile("$desktop$\test.txt")
s-"--7d23542a1a12c2[]Content-Disposition: form-data; name=''userfile''; filename=''test.txt''[]Content-Type: text/plain[][]"
s+"--7d23542a1a12c2--[]"
IntPost "http://www.nightchatter.com/uploader.php" s sr "Content-Type: multipart/form-data; boundary=7d23542a1a12c2"
out sr
here is the page for manual upload:
http://www.nightchatter.com/upload.htm
uploader.php code
<?php
$uploadDir = $_SERVER['DOCUMENT_ROOT'].'/temp/';
$uploadFile = $uploadDir . $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
print "File is valid, and was successfully uploaded. ";
print "Here's some more debugging info:";
print_r($_FILES);
}
else
{
print "Possible file upload attack! Here's some debugging info:";
print_r($_FILES);
}
print "</pre>";
?>
html upload form code
<html>
<head>
<title>upload test</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
</head>
<body bgcolor='#ffffff' text='#000000'>
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="10000" />
Choose a file to upload: <input name="userfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
</body>
</html>
any idea ?