Possible Duplicate:
invoking a php method from java
Never came across with this situation before, so would like to understand / know how to go about this ?
Goal: Call php function from Java
Let's say Java code looks like this
pulic class Testing
{
String userid;
String pass;
String url;
public static void main (String[] args )
{
String value1 = checker ( userid, pass, url );
String value2 = dataGetter ( value1 )
}
public static String checker ( String userid, String pass, String url);
{
// Code to get authenticated
}
public static String dataGetter ( value1 );
}
and PHP code looks like this
<?php
$url;
$size;
function dataGetter( value1, $size)
{
// code to get data from server
}
?>
Will this be possible ? if so can someone explain me how deployment will work ? i.e java being deployed on tomcat and php on apache ?