PHP to Java integration using : shell_exec function
| From: | Office) | Date: | Thu, 26 May 2011 19:00:38 +0000 |
| Subject: | PHP to Java integration using : shell_exec function | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313156@lists.php.net to get a copy of this message | ||
Hi,
Please advise if the following is possible and how can pass parameters from the PHP to the Java application.
Thanks.
Here's my script draft:
<?PHP
...
....
$XML_toEnc = urlencode ($XML);
// The XML_toEnc is a string and shall be urlencoded !
$EncXML = shell_exec(""/usr/bin/java/java -jar MyApp.jar -XML <$XML_toEnc>); <<== ??? How can I pass parameters like a large string of let say XML?
echo $EncXML; // back to the MObile Client
// Receiving client shall:
// urldecode the string
?>
Eli Orr