PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm writing an IRC bot class in PHP, and need some help to get a specific piece of information.
For the USER command, I need the hostname. mIRC gets this by itself, but I need to get it with PHP.
An example of a possible hostname is d54C38C01.access.telenet.be
Since your establishing a connection from the webserver you can (should) use the webserver hostname... $_SERVER['NAME'] or $_SERVER['ADDR'] will do just fine...
Stijn Herreman wrote:
@timvw: I'll try your solution
It all depends on the irc network you're trying to connect with.. A couple of them require that you have an identd running.. (kreynet doesn't require this.. but without and identd it just takes a lot longer to get connected...)
You may want to head into some php channels on IRC and ask around, I've seen alot of great stuff in them including one bot that would process php code and output the results to the channel.