Re: How to make HTTP call to another address?
| From: | Arnout Boks | Date: | Tue, 13 Jul 2004 06:56:28 +0000 |
| Subject: | Re: How to make HTTP call to another address? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190318@lists.php.net to get a copy of this message | ||
Maybe it helps to open the address with the fopen( )- or file( )-function to
read it's contents.
I use this method to get data from (dynamic) html pages on another website.
I don't have that much knowledge about Java servlets, so I don't know if
this works for that also.
Arnout
"Matt Busche" <spammymatt94@yahoo.com> wrote in message
news:20040712172509.18457.qmail@pb1.pair.com...
> I've recently set up some Tomcat/Java/Servlet stuff that provides some
> high-level functions I wish to make available from PHP. In other words,
> from PHP, I want to make an HTTP call to an address like:
>
>
>
> http://mycompany.com/myservlet?request=doSomething&arg1=meat&arg2=potatoes
>
> and then use the returned stream of data to service the original PHP
> request. Clear?
>
> I quickly found the PHP HTTP library (
> http://www.php.net/manual/en/ref.http.php ), but my quick
> perusal makes me
> think this is only useful for controlling the HTTP response sent back to
the
> browser making the original PHP request.
>
> Can someone help me?
>
> FYI: I'm a newbie. Please forgive me if this is an old-hat question.
>
> Matt