Re: PHP-General:HTTP PUT
| From: | Jason Brooke | Date: | Tue, 26 Sep 2000 12:42:19 +0000 |
| Subject: | Re: PHP-General:HTTP PUT | ||
| References: | 1 2 3 | Groups: | php.db php.general |
| Request: | Send a blank email to php-general+get-17602@lists.php.net to get a copy of this message | ||
Hi Deiter - it sounds like you need to have a quick read thru part of the http
rfc.
jason
>
> > 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
> > >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>