S
Star
Hi all,
On my server, I have these 2 pages:
upload.html
-----------
<form name="form1" method="post" action="upload.php"
enctype="multipart/form-data">
<p>
<input type="file" name="file">
</p>
<p>
<input type="submit" name="upload" value="upload">
</p>
</form>
upload.php
----------
<?
$laden = move_uploaded_file($HTTP_POST_FILES['file']['tmp_name'],
"./$file_name");
if(!$laden){
echo"<br><b>error</b><br>";} else {
echo"<br><b>done!</b><br>";die;}
?>
If I open upload.html from my browser, select a file and click on
Upload, the file is uploaded correctly.
How can I do that programmatically?
I would like to send a HTTP POST request including the filename of the
file to upload.
I have tried by using HttpWebRequest but I cannot find the way.
Is there an easy way of doing that?
Thanks a lot.
On my server, I have these 2 pages:
upload.html
-----------
<form name="form1" method="post" action="upload.php"
enctype="multipart/form-data">
<p>
<input type="file" name="file">
</p>
<p>
<input type="submit" name="upload" value="upload">
</p>
</form>
upload.php
----------
<?
$laden = move_uploaded_file($HTTP_POST_FILES['file']['tmp_name'],
"./$file_name");
if(!$laden){
echo"<br><b>error</b><br>";} else {
echo"<br><b>done!</b><br>";die;}
?>
If I open upload.html from my browser, select a file and click on
Upload, the file is uploaded correctly.
How can I do that programmatically?
I would like to send a HTTP POST request including the filename of the
file to upload.
I have tried by using HttpWebRequest but I cannot find the way.
Is there an easy way of doing that?
Thanks a lot.