Re: How do I send files with HTTP socket post (PostToHost)
| From: | Peter | Date: | Sat, 13 Jul 2002 17:23:06 +0000 |
| Subject: | Re: How do I send files with HTTP socket post (PostToHost) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107517@lists.php.net to get a copy of this message | ||
can you not open the file in binary mode and then transfer it as you would
with ASCII?
"Kevin Stone" <kevin@helpelf.com> wrote in message
news:070301c229d5$42420130$6501a8c0@kevin...
> Okay enough answering questions this week, now I have a question to ask.
:)
>
> I have a situation where two web servers need to share files with one
> another. FTP is not an option. So I am resorting to HTTP socket
> connection. I am able to open the connection (using Rasmus's PostToHost
> function) to PHP scripts running on both servers and send structured
queries
> back and forth. This was easy. The queries can trigger actions so that I
> can communicate seamlessly and do work. But I cannot for the life of me
> figure out how to send whole files (mostly image files). There's
obviously
> more to it than just sending the ASCII conversion.
>
> I really don't have any meaningful code to show you. The code is all
> standard anyway so if you know what I'm talking about then you have
probably
> coded it yourself at one point or another. Are there any tutorials or
> examples out there that will show me how to send files using fsocketopen()
> and POST method?
>
> Much thanks!
> Kevin Stone
> Helpelf, Inc.
>