adam291086 Posted November 13, 2007 Share Posted November 13, 2007 Hello, I am a third year student and i am looking into my final year project. I was looking into the possibility in creating a chat program. As i am a systems design student and not a programmer i am trying to stick to what i know, i.e php and mysql. I plan to have a database that stores information about friends and port information. I know chat programs work via sending messages directly to another computer, via ports. This is my question. Is it possible to use php to send a message to another computer, via ports? if so what ports do i use. Sorry if this sounds silly but i dont have a lot of php knowledge or coding knowledge in general. Quote Link to comment Share on other sites More sharing options...
revraz Posted November 13, 2007 Share Posted November 13, 2007 Like this? http://php.resourceindex.com/Complete_Scripts/Chat/ Also, maybe change your Subject to something that references your question. Quote Link to comment Share on other sites More sharing options...
adam291086 Posted November 14, 2007 Author Share Posted November 14, 2007 Hey, Yes i do mean like those chat programs. I want to create that for myself. How have they done it? I dont want to have to run a query every minute searching for new messages. I'd rather send messages directly from one computer to another. Is this possible with php? Quote Link to comment Share on other sites More sharing options...
aschk Posted November 14, 2007 Share Posted November 14, 2007 No... Quote Link to comment Share on other sites More sharing options...
adam291086 Posted November 14, 2007 Author Share Posted November 14, 2007 oh how do i go about it. I have a year to learn. Any ideas? Quote Link to comment Share on other sites More sharing options...
aschk Posted November 14, 2007 Share Posted November 14, 2007 Because it is browser based it ALWAYS need to be between the client -> server , i.e. the client is asking the server for the latest information, unless you want to create a java applet, but that's a long dark road... Pretty much the same way those scripts that revraz pointed you to do. You have the client querying for new messages every so often. In theory the request is small, the updated message is small, the database query (if you are using one) ought to be relatively simple also. My advice (as a former final year Comp Sci. student), is to not think up your own project but take one of the ones that is on offer. Yes they seem harder but it'll prompt you to work better and not rely on the knowledge you already have. If you are really adament about doing a chat program then take it out of the browser and make it standalone (like MSN/Yahoo Chat). Quote Link to comment Share on other sites More sharing options...
adam291086 Posted November 14, 2007 Author Share Posted November 14, 2007 OK i did think as much. I never got on with java so i am trying to stay well clear. Thank everyone for the push in the right direction. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.