I'm finding a way to build a chat client in j2me for a php based website. Can anyone help me?
Googled and nothing found useful.
Also read below topics. But didn't get idea.
https://robot.lk/viewtopic.php?f=11&t=1852
https://robot.lk/viewtopic.php?f=11&t=1925
How to creat a J2Me chat client for a PHP website
Re: How to creat a J2Me chat client for a PHP website
From my understanding, php and j2me has no direct interaction. If that is the case, what you output with php is what you seen on the browser. So in simple terms, you will have to output required JavaScript/ HTML-Java class, etc... from the php code which the client (browser) will see as the output.
Alternatively, you can directly use AJAX (asynchronous JavaScript and XML) if not specific to a mobile browser. This is the best known way to create chat engines for the web. With this method you can update part(s) of the page without refreshing the whole page. w3school's AJAX Tutorialis very good.
Alternatively, you can directly use AJAX (asynchronous JavaScript and XML) if not specific to a mobile browser. This is the best known way to create chat engines for the web. With this method you can update part(s) of the page without refreshing the whole page. w3school's AJAX Tutorialis very good.
Re: How to creat a J2Me chat client for a PHP website
No no. I want to create a j2me client (for mobiles phones) for my own php site. It's very easy to code the php site. But I don't know how to connect to website using j2me and how to hadle connections using php. I think it will use Socket connection. Because http connection isn't suitable for a chat client because of we have to relord always.
[ Post made via Mobile Device ]
[ Post made via Mobile Device ]
Re: How to creat a J2Me chat client for a PHP website
Here is a way to interact between J2ME and PHP. See How to interact J2ME with PHP.
You might also look at PHP Interacting with J2ME article at Dev Articles.
So from J2ME, it would be a HTTP POST or GET to the PHP page. As Neo stated on AJAX, you can use AJAX directly without J2ME. However it would be browser based. If you want an application (a client), then you will have to J2ME. Make sure one design aspect. Most of the servers are limited to handle only a few simultaneous connection. Good hosting companies provide about 20. So you will have to take care on that. In other words, if you have about 100 users chatting at the same time, shared server might not handle this. That is why dedicated servers (or with good VPS) are usually used for mass scale chat systems.
You might also look at PHP Interacting with J2ME article at Dev Articles.
Sockets are the underlying layer in network communication. Even HTTP, FTP like protocols are also using sockets. A socket is associated with a IP and Port. If you take a web server, it works on a specific IP and Port 80. In other words, when you a HTTP POST or GET, the system internally use sockets to fetch data through Port 80. If you are going to host on a shared server, you are not allowed to use ports other than 80 (HTTP), 21 (FTP) and a few more (POP, SMTP, IMAP, SSH, SFTP, etc..). So in most cases, you need to design your chat server to work with HTTP POST/GET.I think it will use Socket connection. Because http connection isn't suitable for a chat client because of we have to relord always.
So from J2ME, it would be a HTTP POST or GET to the PHP page. As Neo stated on AJAX, you can use AJAX directly without J2ME. However it would be browser based. If you want an application (a client), then you will have to J2ME. Make sure one design aspect. Most of the servers are limited to handle only a few simultaneous connection. Good hosting companies provide about 20. So you will have to take care on that. In other words, if you have about 100 users chatting at the same time, shared server might not handle this. That is why dedicated servers (or with good VPS) are usually used for mass scale chat systems.
Re: How to creat a J2Me chat client for a PHP website
Thank you very much Saman.Saman wrote:Here is a way to interact between J2ME and PHP. See How to interact J2ME with PHP.
You might also look at PHP Interacting with J2ME article at Dev Articles.
Sockets are the underlying layer in network communication. Even HTTP, FTP like protocols are also using sockets. A socket is associated with a IP and Port. If you take a web server, it works on a specific IP and Port 80. In other words, when you a HTTP POST or GET, the system internally use sockets to fetch data through Port 80. If you are going to host on a shared server, you are not allowed to use ports other than 80 (HTTP), 21 (FTP) and a few more (POP, SMTP, IMAP, SSH, SFTP, etc..). So in most cases, you need to design your chat server to work with HTTP POST/GET.I think it will use Socket connection. Because http connection isn't suitable for a chat client because of we have to relord always.
So from J2ME, it would be a HTTP POST or GET to the PHP page. As Neo stated on AJAX, you can use AJAX directly without J2ME. However it would be browser based. If you want an application (a client), then you will have to J2ME. Make sure one design aspect. Most of the servers are limited to handle only a few simultaneous connection. Good hosting companies provide about 20. So you will have to take care on that. In other words, if you have about 100 users chatting at the same time, shared server might not handle this. That is why dedicated servers (or with good VPS) are usually used for mass scale chat systems.
I didn't know that port problem (with shared hosting).
[ Post made via Mobile Device ]