Re: How to make HTTP call to another address?
| From: | Manuel Lemos | Date: | Tue, 13 Jul 2004 21:22:48 +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-190397@lists.php.net to get a copy of this message | ||
Hello,
On 07/12/2004 02:24 PM, Matt Busche wrote:
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.You may want to try this HTTP client class. If necessary it supports cookies and submitting forms with field values via POST if you want: http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html