Jump to content

[SOLVED] Interfacing to a C or Java plugin


blackcell

Recommended Posts

Not the wrong forum but, when asking questions that are this unordinary, you really need to provide details so we can help.

 

Normal questions -- we can usually discern what the intention is.

 

This one, I cannot.

Link to comment
Share on other sites

If I build something with another language how do I implement it into a web page? Do you have to do the interfacing method with the language you built it with? For instance, JAVA applications on websites. Are they built with the functions to tie into a web page with the Java language?

Link to comment
Share on other sites

Hmmmmmm..

 

I am pretty sure you can look up Java JNI to come up with a solution if you needed to, but generally if you want to hook 2 apps up you're going to need to provide some sort of way to interface.

 

If you wanted to have a chatroom written in Java that a PHP script could work with, most likely what you'd do is set up (prototype):

 

TcpIpConnection.java

ChatRoomServer.java

 

(And you'd have ChatRoom.java + friends for servicing the normal chatroom)

 

ChatRoomServer would initiate a TcpIp Listen on port <x> and broadcast any events that happened in the chat room.

 

Beyond doing some sort of integration like that, remember, any function provided by PHP is actually implemented in C/C++. You could write your own extension (like GD) that interfaces with your chat program, so that in PHP all you would have to do is like:

 

chat_start();

#in some sort of ajax script

print chat_poll();

 

Hope this makes sense.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.