Jump to content


Photo

Remote Upload


  • Please log in to reply
2 replies to this topic

#1 matk

matk
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 13 October 2006 - 10:26 PM

Hello,

I am searching a script which I can remote upload files to my server.
I find something like this but doesn't work:

if (isset($drop_field)){
  $fd = fopen($drop_field, "r");
  $fd_dest = fopen($c_browser->get_intern_path(basename($drop_field)),"w");
  if (!$fd)
    echo "Cannot open the url to copy";
  if (!$fd_dest)
    echo "Cannot write the copy of url";
  if($fd && $fd_dest){
    while (!feof($fd))
      fwrite($fd_dest,fread($fd, 4096),4096);
    fclose($fd);
    fclose($fd_dest);
  }
}

<form method=post enctype="multipart/form-data">
      url:
      <input name=drop_field type=text size=8>
      <input type=submit name=button value="copy">
     </form>

Can anyone help me?

Thanks !

#2 matk

matk
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 18 October 2006 - 10:13 AM

anyone ?  :-[

#3 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 18 October 2006 - 10:37 AM

Look at $_FILES and handling file uploads in the PHP manual.

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users