Click to See Complete Forum and Search --> : java and php bridge


alex82
09-05-2006, 05:53 AM
hi,
i have a java application to create users accounts and i also have
a php script to manage web user's Statistics.
is it really possible to find a way to include my php script
into my java application in a secure way?
i mean that when user is logged in my java application he is able
to consult his web statistics selected depending on java application
user selected but everything in a secure java session environment.
thanks a lot

agent_x91
09-09-2006, 02:54 PM
Rather than trying to embed PHP in Java, wouldn't it make more sense to simply do the same task in Java?

deepnov
09-12-2006, 04:54 AM
Hi,
I dont know about accessing php in java :confused: . But it is easily
possible to access java classes in php if you have the
required php extension for java bridging.

agent_x91
09-13-2006, 06:11 AM
If I'm understanding you correctly, you want to embed a PHP script's functionality into a Java application, right? Rather than trying to do that, just use Java to perform the same tasks as your PHP script would; it'd be a lot easier than trying to make your application understand a PHP script.

Alternatively, if you just want your application to trigger a php script, you can connect to the website and use HTTP to request the php file, thus triggering the php script. Displaying the actual file would be more difficult though, and would require you to make your program able to interpret HTML and display the file accordingly.