Reputation: 181
Hii folks i am having one question please don't mark this post as spam .I am just beginner in web services and need of a chat application on ios app .
I am using cake php for web services. i just want to know the keywords i mean how can i search for this topic i am having some keywords like socket and comet to built chat services .
please guide me just want to know how we can implement this not coding just hint me then i will Google for this .Also please tell me which one would be best because in my app while chat a user can send 10 sec video
Upvotes: 2
Views: 1277
Reputation: 3041
Hey as Nishant says you have two option of REST
and SOCKETS
.
But problems arise in both ajax and sockets.
If you want to use sockets than PHP
is not suitable for that , I suggest to use socket.io with Node.js or Erlang or Akka with Java or Scala and else if you want to use REST than you can try MySQL + PHP + JavaScript
.
I can give you a short rough example of REST with JQuery:- var lstmsg; window.onload=loadchat();function loadchat(){$.post('newmsg.php?lstmsg='+lstmsg,'xml',function(xml){/* here will be the code to handel ajax*/}); setTimeout('loadchat()',5000);}
Upvotes: 1
Reputation: 2128
yeah.. if you want to create a chat application than there are two main options, one is socket programming
and another is ajax
.....
here is a link for example of socket programming using php
http://www.codeproject.com/Tips/418814/Socket-Programming-in-PHP
but it is little complicate to understand.
I will suggest you to use ajax
rather than sockets
..
Upvotes: 0