Re: Calling PHP from Java usign CGI...

From: Date: Thu, 26 Jun 2003 23:16:28 +0000
Subject: Re: Calling PHP from Java usign CGI...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-153041@lists.php.net to get a copy of this message
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" <rodrigo@instaservi.com> wrote in message news:20030626223940.20059.qmail@pb1.pair.com... > 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 > >

« previous php.general (#153041) next »