![]() |
mirc php script
anyone know of a php script that is like mirc?
-that shows the users logged in thanks |
Perhaps you mean a chat room, and that can't be done using php only.
|
Quote:
|
|
Quote:
To help guide the original question, in order to display the logged in users on an IRC server all that you need to do is connect to the server and send along a specially formatted command that the server understands, nothing complicated at all. There are various implementations in PHP which make talking to IRC servers easier, faster, object-oriented and so on (a Google search should suffice) or you can learn to use PHP's built-in code to do things in a more low-level way (through sockets and such like, which most of the abstractions do anyway). |
I've even made an IRC bot in the past with PHP, so PHP is more than capable of doing it. I'll see if I can dig up the code and show you the IRC commands you need to post through a socket to the IRC server.
|
Sorry guys, I didn't mean that it can't be done literally, what I meant is that nobody likes a chat room where the page need to be refreshed when posting a message or when a user logs in/out. That's why I said "php only". In order to do a decent chat room you also need to make use of some javascript (ajax) and SQL. Obviously, there's more than php there. I, personally, would also use a Java server to do all the server-side work and let PHP handle the client part. Simply because it's more efficient than PHP when talking about sockets and streaming (see threads and buffering).
But, I guess I missed the point a little bit, because now I see that he wants to send messages to an IRC server rather than create a chat server. |
I have quickly knocked this together
PHP Code:
PHP Code:
PHP Code:
PHP Code:
You may need to change the numbers or make a regex that does it, but i dont have the time currently, un-comment the echo in the main loop to see the server responses. The script outputs : Code:
|
| All times are GMT. The time now is 09:14 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0