Port Listener - FPS game
I just got added to a new project and as I'm a novice in web development, I need a little bit of help. I'm working on a project called VBS 2 (which is a FPS game) mingle with a trust system. Basically while you play, messages will be displayed (time, information, source and level of trust) and players will tell whether they trust this information or source or not.
My job is to display the messages so I guess, I have to implement a port listener that for each new incoming message on the specific port, will add the content of the new message to the current displayed list. I have absolutely no clues if it's feasible in PHP, so please let me know how you would implement that idea.
Thanks a lot,
It's not the best language for that, you would be better off with something like Python for such a task.
If you must go down that route... remember to handle output buffering... remember to flush it each time you want to send data to the browser... and here is the huge list of socket functions you may need:
I've recently built an instant messenger using PHP & MySQL as the backend... and i had to do it using AJAX using the Prototype library. This works well because sockets tend to be a pain the ar*e to program and to do it in PHP is like ice skating up hill!
P.S. I also did a IRC bot a while back using sockets - trust me, it's not nice programming!
Yeah, Python would definitely work better. Ruby (not Ruby on Rails) could do the trick as well. I made an interactive SSH client using Ruby once. It was pretty easy. Just had to run it as a service.
Thanks for your useful responses. Unfortunately, I never did either python or Ruby but I found out a script using sockets in Php and modified it in order to display the informations needed.
Thanks a lot for your help guys.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread