How to make HTTP call to another address?
| From: | Matt Busche | Date: | Mon, 12 Jul 2004 17:24:19 +0000 |
| Subject: | How to make HTTP call to another address? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-190317@lists.php.net to get a copy of this message | ||
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