Fetching Documents from remote address in PHP

We can get information uploaded from the remote client system using PHP script below

HTML 

<form enctype="multipart/form-data"   action="upload.php"   method="post">
<input type="file" name="ufile">
<input type="submit" value="submit">


PHP script

<?php
 $fdir="C:/xampp/htdocs/mysite/uploads";
$furl="http://localhost/mysite/uploads";
echo $ufile;
print "$fdir/$ufile_name";
copy($ufile,"$fdir/$ufile_name");
print "copied <br><img src='$furl/$ufile_name'>";
?>

Also See How to upload file on server using PHP

Comments

Popular posts from this blog

Tricky Questions or Puzzles in C

Program to uncompress a string ie a2b3c4 to aabbbcccc

Number series arrangement puzzles