Jump to content
xisto Community
Sign in to follow this  
pikaz

Java + Php

Recommended Posts

My question is concerning using java and php (mysql databse) together. I was wondering if it was possible or easy to mesh to two. For example, I am working on a text based php game, like so mnay others out there. I want to implement java though, like for mini games. I want java to be able to recognize when logged in and be able to pass variables. Say when a player logs in using php (and mysql), then they log into the java game it can use their user name and edit stats, like gain money and such from the game and have it save to the mysql databse.sorry if my description is a bit awkward.

Share this post


Link to post
Share on other sites

I think that you would just have to have php echo the applet tag or do like below, wouldn't you? I didn't think there was anything special there...

....blah.........blah...../?><APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25></APPLET></php....blah.........blah.....

Let me know if I completely missed what you were trying to ask.....

Share this post


Link to post
Share on other sites

There is a way to mesh java code in with php, through a php extension, but this may not be what you're looking for. This is a link to php.net's site on the java<->php integration.

http://forums.xisto.com/no_longer_exists/

Check this out and see if its what you are looking for. Here is a quote from the page:

There are two possible ways to bridge PHP and Java: you can either integrate PHP into a Java Servlet environment, which is the more stable and efficient solution, or integrate Java support into PHP. The former is provided by a SAPI module that interfaces with the Servlet server, the latter by this Java extension.
The Java extension provides a simple and effective means for creating and invoking methods on Java objects from PHP. The JVM is created using JNI, and everything runs in-process.


Maybe this is what you are looking for, well later.

Share this post


Link to post
Share on other sites

Hello ppli'm a newbie in programming. I think which technology to choose. JSP or PHP. if i choose one and then decide to use another one later. does anybody know how to use JSP and PHP together?thanks in advance

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.