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. Link to comment https://forums.phpfreaks.com/topic/167341-solved-simple-php-irc-bot-question/ 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. Link to comment https://forums.phpfreaks.com/topic/167341-solved-simple-php-irc-bot-question/#findComment-882386 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. Link to comment https://forums.phpfreaks.com/topic/167341-solved-simple-php-irc-bot-question/#findComment-882457 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. Link to comment https://forums.phpfreaks.com/topic/167341-solved-simple-php-irc-bot-question/#findComment-882472 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! Link to comment https://forums.phpfreaks.com/topic/167341-solved-simple-php-irc-bot-question/#findComment-882613 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.