Can anyone please help me to create a chat with php using sockets ? Please help me with some resource sites or links !
What about using ajax? google.ie/search?sourceid=navclient&ie=UTF-8&rls=GGLJ,GGLJ:2006-49,GGLJ:en&q=ajax+php+chat very good scripts out there already.
Ajax can be used with php without a problem. follow the link above for Google and you'll get lots of scripts ready-made.
I think you're going to have a hard time finding someone to 'help' with a chat program like you want. My advice would be to use google until you find what you are looking for, or pay someone to do it for you (assuming you can't wait).
Using sockets? What exactly does that mean, you might be confusing this with Unix sockets where you can create a client/server setup. For a PHP based chat setup, you need constant calls to the server to check for new data. Whenever a user types something, it has to be saved on the server so the other participants can get it the next time their client checks for new chat data. You could use AJAX to make it a little more transparent to the end user, but it still needs to continually connect to the serve to check for new data. This type of a chat might work OK for a few people, but if you want a large number of users the server requirements will go up quickly. Each connected user needs to send a request to the server every second or so, depending on how "instant" you want the chat to be. A "true chat" would involve something like an Enterprise Java server on the back-end, where you have a service running, and an applet on the client side.
PHP supports raw sockets and can be used to run client/server apps. You just need to use the http://us2.php.net/manual/en/function.fsockopen.php fsockopen function to open the connection to whatever you're chatting with. You can then write data to that connection just like writing data to a file. If you want to write a PHP chat server you can use http://us2.php.net/manual/en/function.socket-accept.php and other socket functions to listen and respond to requests. If you want this web-based then yes, ajax would be the way to go. But if you just want a stand alone PHP app then you can use sockets. You just need to learn the protocol of the server so you know what data to send and how to interpret the data coming back.