Undoubtedly0 Posted July 24, 2009 Share Posted July 24, 2009 Hi all! I recently copied the php code for a simple IRC bot found here: http://www.dreamincode.net/forums/showtopic82278.htm but now I would like to run it and I don't know how. I have programmed IRC bots before in mSL, but never yet in php so I am completely lost. Thanks for your time - let me know if this doesn't make sense or if I'm an idiot. Quote Link to comment Share on other sites More sharing options...
gizmola Posted July 24, 2009 Share Posted July 24, 2009 You use the command line php interpreter to invoke the script -- php -f yourbot.php. Quote Link to comment Share on other sites More sharing options...
Undoubtedly0 Posted July 25, 2009 Author Share Posted July 25, 2009 Sorry, I'm not familiar with 'command line php interpreter'; is this something I need to add to the script - or something I need to download in order to run the script? Thanks again. Quote Link to comment Share on other sites More sharing options...
gizmola Posted July 25, 2009 Share Posted July 25, 2009 The php core interpreter can be run in two different contexts. One is as a standalone program, and the other is as a webserver module. The command line interpreter is the standalone program. Usually they are both installed when you install php. You didn't indicate what operating system you are running under, but in either case, you want the program to be in the path. If it's windows then the program is named php.exe. If linux/unix it's just going to be php. You would run these from a shell. In linux that's pretty standard stuff, but in windows you'd need to run it either in cmd or command, or use the windows run command to run it. Quote Link to comment Share on other sites More sharing options...
Undoubtedly0 Posted July 25, 2009 Author Share Posted July 25, 2009 Okay, so I downloaded php, and ran the file with php.exe (I'm on Windows xp) and it opened a cmd and said that it connected to IRC - was this what I was supposed to do? Thanks again for your help - it's greatly appreciated! 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.