Re: Calling http from within php
| From: | Jeff Warrington | Date: | Tue, 25 Jul 2000 18:52:19 +0000 |
| Subject: | Re: Calling http from within php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8109@lists.php.net to get a copy of this message | ||
In article <8lkbqs$kha$1@toye.php.net>, datahntr@yahoo.com ("O.") wrote:
There are a few HTTP classes out there you can use to mimic a browser
for making HTTP requests. Some include the ability to make POSTs
and send/accept cookies. Snoopy is one of them and can be found
on freshmeat.net. Also check out phpclasses.upperdesign.com
If you search in the archives, you will find a quick and dirty
function called PostToHost that opens a socket and sends
and receives to/from another server.
For communicating with a secure server over HTTPS, you will
need to use an external program, the most popular being
Curl (also can be found on freshmeat.net). I have used various
of these pieces of code at my job to talk to other servers, typically
for sending POSTs of data and parsing out the responses.
if you need any help, you can mail me
Jeff
> ""Donald French"" <dhf@myonramp.net> wrote in message
> news:00dd01bff646$8c1b3480$dca8a8c0@faxnet.cp...
>
>>I need to be able to call another http server from within php. The
>>output
> from this second server needs to be processed prior to sending it to the
> original caller.
>
>>Can this be done in php?
>
> What on earth is "calling another http server"? If you mean you need to
> get data from an HTTP server, yes, PHP can do that. Easily. See fopen()
> in the manual at www.php.net
>
>
>>Also I need to open two sockets, one as the server side and one as the
> client side. These are talking to an image server requesting an image,
> then accepting it. This actually follows the FTP protocol. Can this
> also be done in php.
>
> Yes, PHP can do this too. See the manual under FTP functions.
>
> The manual is a wonderful thing.
>
> --
> O.
>
>
>
>