Re: PHP-General:HTTP PUT

From: Date: Tue, 26 Sep 2000 12:15:14 +0000
Subject: Re: PHP-General:HTTP PUT
References: 1 2  Groups: php.db php.general 
Request: Send a blank email to php-general+get-17596@lists.php.net to get a copy of this message
> http://www.php.net/manual/features.file-upload.php has a > sample of what you > need to do -- Thanks, but I was aware of this manual page. This is not what I need! Please have a look at my script: I need to upload the file to some stupid IIS Server utilizing the PUT method using PHP on my side. Any suggestions?! -- see this unfinished example: <? // send a file using the PUT method $my_file="... this is supposed to be the content of my file ... "; $fp = fsockopen("my.server.com", 80, &$errno, &$errstr, 30); if(!$fp) { echo "$errstr ($errno)<br>\n"; }else{ fputs($fp,"PUT /path/to/file.xml HTTP/1.1\n"); // // what do I have to send here? headers? filesize? ??? // fputs($fp,$my_file); fclose($fp); } ?> Thanks, Dieter > > How to make a HTTP PUT request to a server in order > > to send a file? What is the difference to e.g. a simulated > > POST request? I have a server that accepts files by the > > PUT method and need to upload files using a PHP script > > to this server. Please help! > > > > Thanks, > > dk > > >

« previous php.general (#17596) next »