I am trying to create a web chat application with PHP, MySQL.
I want to stream the data from the server to client instead of requesting the server in a regular intervals which will cause huge load at servers.
I believe this is possible in many ways and XMPP is one of those i heard earlier, but i have no idea how to adopt this xmpp into scripts, how to use it?
If some one can give some examples or code references that would be great help.
Please check the documentation of XMPP,
All the social media sites including Google facebook uses XMPP in their instant messaging.
For working with XMPP on client side, you can either use websockets or http bind(aka bosh) based on your requirements and support from the xmpp server. I have tried and experimented with trophyjs and Candy.Js. Candy being slightly better in terms of plugins and support if you like chat rooms.
Related
I have reached a good stage in programming (php), but there are some things that hinder me in progress, which is that I cannot create some types of sites and use some APIs, and sites that hinder me in progress
And the first problem that hinders me is: -
I would like to create a live video streaming site and have read and found that I have to use webRTC, but I only found a two-person connection or a server used to connect to more than two people, but that is the point. I did not find a source for learning or an application example that shows me what I want, is there any application available in php and webRTC so that I can learn and please if there is an open source application and not documented, because I am not strong in the English language, I am in the stage of learning
When I understand and I can program the first obstacle, which is a live broadcast video, I will request your help again in some problems, which are sms api, visa api, paypal api and imap in php
Thank you in advance
As you may have already realised WebRTC knows how to communicate with other peers, but it doesn’t know how to discover these other peers. For discovery you can try Ably - use it as a realtime signalling platform in collaboration with WebRTC.
I'd really recommend having a look through Ably's WebRTC tutorial series. More specifically there's a tutorial focussed on video calling using WebRTC and Ably. I hope that helps, or is at least a good place to start.
I need for a project to build a live chat with:
group chat room
private chat (user-user);
web site interface;
mobile interface;
others information (profile etc).
I want to start obviously from the server: any PHP framework or tutorial to do this ?
Otherwise, any full-solution (but customizable) with web site + mobile compatible ?
Use XMPP Server (XMPP server uses Socket programming, so once a connection will be establish, then it uses that connection each and everytime, you no need to create connection everytime, like HTTP).
Or Use GCM (Using Push Notification you can send and receive messages as well).
Here are some Source Code - Github
Source from google
Hope it helps.
http://vidorsolutions.blogspot.pt/2011/01/writing-xmppjabber-chat-application-for.html
This would be the best place to start!
Have fun building the app!
Also if you really want to get deep into it, Xabber source code will prove of great help.
XMPP is a communication protocol for message-oriented middleware based on XML (Extensible Markup Language). In plain words it is a protocol used for instant messaging.
While APNS and GCM are services used to set up push notifications for your apps.
So, it's a bit different.
I believe building a chat app from scratch is not an easy task for you.
So, I'd recommend using a ready backend and concentrate on client-side implementation of your app.
For backend you need to choose a provider with the set of features most suitable for your project and then start app development with the API provided by your backend provider. You might find this article useful when choosing.
It seems you are looking to get going fast on your chat implementation...the xmpp implementation is one way. Firebase provides another. Having implemented messaging via xmpp as well as firebase, I can offer up this tip: stable connectivity and auto-reconnect logic in an openfire+SMACK implementation is not particularly reliable. I have had recurring troubles maintaining connection in the face of drop offs; updates in Openfire that may or may not conform to the older SMACK library versions are not helpful (no one guarantees for conformity - you are on your own). Others with more xmpp-based experience may attest to these difficulties. Firebase is not without its own challenges but I found them manageable. I also recommend you checkout at least one opensource chat library implementation via firebase (github link being one such). With firebase the connectivity issue largely goes away and a host of new options open up. I prefer if the backend is fully taken care of by the library provider so we only need to focus on UI. Hope this is helpful.
I have been studying WebRTC from last 2 days but couldn't understand how to develop and stand up a server based on WebRTC for iOS.
I really don't want to use any 3rd party Audio/Video chat service providers in my application even if they are WebRTC based. I want to create my own WebRTC based custom Audio/Video chat.
I just need a startup guide for developing WebRTC based chat server.
Couple of things:
You will have to work with the NativeAPI and compile for iOS, this tutorial should help, this is for the iOS client side only.
If you chat is only one-to-one a simple websocket or socket.io with node.js for your signalling server should be simple enough
If you want numerous parties in the same chat, you will either have to handle all the individual connections(numerous individual peer connections for each device connecting) or implement a type of MCU, licode is an EXAMPLE of such
Those links are just examples of how people have done similar things before, you should not have to utilize their libraries or their solutions. But, you WILL have to use the WebRTC Native API, handle numerous peerconnections for each client(or create your own MCU server), and handle the signalling between each client(for connection start up and tear down).
You can also try Icelink api provided by Frozen mountain
They have provided free trials for iOS, android , web client, windows phone.
Also they have provided their own turn and stun servers which can be only used in windows server 2013. Overall library is very well documented and easy to use.
You need to register yourself to download the api, which is free of cost.
Hope it meet your requirements.
Good luck
In my website, I have to make a chat system similar to Gmail so registered users can chat with their group. I have no idea about how I will do this. Can anyone provide me with an idea of how to implement this or any useful links? I have to do it using Zend Framework.
Since you are looking to work this out using Zend framework, have a look at Jaxl library (Jabber XMPP Client/Component Library). The library can be integrated with any existing website/framework and also contains several examples for browser based chat applications.
Actually there are two parts for chatting:
A long running request that streams massges from the server to the client
Ajax messages from the client to the server that sends one message to the server
For the second, any ajax framework will do it. For the first you might have a look at Comet to get the idea for this. But you should be aware that html isn't ment to be a chatting protocol. If you don't pay attention such stuff can easily kill your server.
I am wondering how to integrate jabber instead of using my AJAX polling script. I chanced upon the following: http://code.google.com/p/xmpphp/
It gives me access to a jabber server, but does not tell me how to exactly go about it. I mean for example
$payloads = $conn->processUntil(array('message', 'presence', 'end_stream', 'session_start'));
Are there a fixed set of commands that I can use? Is there some site which explains the jabber workflow in very simple terms?
Thank you very much for your time.
I've been wondering about technologies to play around with XMPP, been looking at:
Strophe
BOSH
Examples of this technology can be seen at:
drop.io
Chesspark
These two doc pages seem to be fairly readable:
Core
Instant Messaging and Presence
Also, you might already be heavily invested into xmpphp, but if not, you may want to take a look at Phurple. It gives you access to the libpurple library (the code-base for Pidgin) from PHP.
From the project page:
This libpurple PHP binding, which
defines a set of internal classes,
gives a possibility to use aol and icq
(oscar), yahoo, msn, jabber, irc and
much more protocols directly from PHP.
Write your own IM chat client in PHP,
as simply as PHP enables it.