Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP IRC bot?
#1
Hey all,

As the thread subject suggests, I'm looking for an IRC bot that can be hosted on normal web hosting, I've found some but I have no idea how to make it work, I just need something that I can upload and extract to a normal hosting, and for it to just work. Any suggestions?
Reply
#2
Yep.I also am looking for that, But after a bit of searching I didn't find it. So I searched for regular bots that can be hosted on Linux, And finally started using Eggdrop. Its coded in TCL. Also you can find many TCL Scripts for Eggdrop. But the most hard part of the work is to compile the bot, I was stuck on that for days. Finally compiled it and added many scripts and now my bot is awesome Big Grin. But still if anyone can find PHP IRC Bots, pm me I need it.
Thank you FreeDomain.Club For my VPS.
Reply
#3
(06-10-2016, 03:14 AM)zihadeasin Wrote: Yep.I also am looking for that, But after a bit of searching I didn't find it. So I searched for regular bots that can be hosted on Linux, And finally started using Eggdrop. Its coded in TCL. Also you can find many TCL Scripts for Eggdrop. But the most hard part of the work is to compile the bot, I was stuck on that for days. Finally compiled it and added many scripts and now my bot is awesome Big Grin. But still if anyone can find PHP IRC Bots, pm me I need it.

It looks like I'll have to find a linux IRC bot too and use it on a VPS (Hopefully the one I'll get from here haha Big Grin ), I don't know what are all those bots that claim to be PHP bots though, I wish I had some better understanding to use it on normal web hosting really, it'd save me all the trouble, but it looks like it needs some sort of configuration and compiling and lots of weird stuff I don't know how to do hahaha.

But thanks for that Eggdrop suggestion, I'll be sure to look into it.
Reply
#4
Take a look at this php irc bot:
Simple PHP IRC Bot Script
New version: https://github.com/pogosheep/IRC-Bot/zipball/master
Description
Simple PHP IRC Bot, is a simple PHP IRC Bot class designed to connect to an IRC server, run a few simple commands. This script is designed and intended to be built upon, perhaps you could build a PHP IRC Client, so please follow some of the notes below for guidance. This bot is based off a PHP IRC Bot tutorial done on our sister site.
Warning
This script uses PHP sockets, and most shared hosting and some servers have it disabled by default. This script runs continuously so it is not recommended to run on shared hosting accounts. We recommend you run it locally using the instructions below.
Installation

  1. Download or copy paste the script from this page

  2. Rename the file to bot.php ( Sorry, the site will only allow me to upload it as bot.txt)

  3. Edit the $config array in the script to the server settings, should be self explanatory

  4. Download and install XAMPP

  5. Place bot.php in the htdocs folder of your XAMPP installation

  6. Don’t forget to start the Apache server by pressing the start button in the XAMPP Control Panel

  7. Go to http://localhost/bot.php, and the bot should connect and join the channel you specified in about 30 seconds
Code
Download bot.txt (Right click, Save As…)
Features and Functions

  • !join #channel – Joins the specified IRC channel

  • !part #channel – Leaves the specified IRC channel

  • !say #channel Message – Says message in the specified IRC channel

  • !restart – Quits and restarts the script. (Helpful while testing the script)

  • !shutdown – Quits and stops the script.
Usage and output:
<random-user> !say #nystic_chat hello there
<wildphp-bot> hello there
__                    
|_  _ |_  o  _ |      
|  (_||_) | (_)|__|_|><


If you enjoyed, please give me your like (:
Reply
#5
One problem @FabioLux The bot gets disconnected from the IRC after some moments. And we need to refresh the page again to make it connect
Reply
#6
Webhosts will not allow this, but I have written a bot in PHP. My advice is get a vps or shell, install, php and run it there. You could run it at home if you leave your computer on all the time {i do so}.
Got reply from 8.8.8.8: 128353ms.
Reply
#7
(06-18-2016, 02:55 AM)Fahad Wrote: One problem @FabioLux The bot gets disconnected from the IRC after some moments. And we need to refresh the page again to make it connect

This could probably be due to ping / pong handling. Every here and there the server might send something to you to see if you're still connected and you would have to respond.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)