I’m implementing a IRCBot to send files but can’t find anything on this, has anyone ever done this?
- PHP is the language
- Symfony 2 is the framework
- IRCBotBundle https://github.com/whisller/IrcBotBundle I’m using / modifying
Looking for implementation on sending files from the IRCBot to a end user. I’ve seen some mention of DCC but nothing for PHP
IRCis a chat protocol not a file sharing protocol, however for file sharing some client’s such as mIRC useDCC(Direct Client to Client) to send any files.This is acomplished using commands such as
DCC SEND <filename> <ip> <port> <file size>This would have to be implemented into your bot (not something IRC supports directly), therefore you would have to open a socket to their IP address and send the file in the buffer using
socket_send().http://www.php.net/manual/en/function.socket-send.php