Catalin
I am also quite new to all this. I'll tell you a bit more about what I
am trying to accomplish here. I am working on some project which has a a lot
of code written in PHP and is going to need also a lot of code in JAVA. So,
I was thinking that it would be great if we could have PHP connected to our
servlet container and web server, which is Jetty. I looked in the mailing
lists for info about this, and I found a servlet which connects (or at least
tries) to PHP using CGI (Common Gateway Interface).
The HttpURLConnection is algo a good idea. Still, it would be a lot
better if I could just connect PHP to Jetty the same way PHP connects to
Apache using CGI. Any idea on how to accomplish this? Thanx...
Rodrigo
Catalin Trifu [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
I didn't quite understood what you mean by CGI in this case,
but if you reffer to calling a script which resides on a server via HTTP
protocol, i suggest you take a look at the java.net.* package, You can
use the java.net.URLConnection to connect to the PHP script and act
as a client (like a browser) for it from your servlet.
You should het the response from the script back through the
getInputStream()
ar any other method that suits you.
Also take a look at java.net.HttpURLConnection which has more
specific methods for dealing with HTTP.
Once again, I may have misunderstood you, but I hope this is
helpfull anyhow.
Cheers,
Catalin
Rodrigo Reyes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi all
Has anyone been able to call php from a servlet (JAVA) using CGI
interface? I am trying to do that here, and everything seems to work
without
problems, except that no data returns from the execution of my scripts.
Any
idea what could be happening? Is there information on how to configure
the
CGI variables in order to be able to call PHP? Thanx in advance...
Rodrigo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php