How do I connect to IRC with Php?

My two cents, although this is not general programming forum:

  • The error message is from JavaScript
  • Use absolute paths when including, e.g. require_once(__DIR__.'/../config.php');.
  • you don’t need to put the closing tag (?>) at the end of PHP files. So omit these to reduce future errors regarding “headers already sent”
  • var $ex array(); is missing an equals?
  • send_data() is not implemented yet, I guess?

edit:
I don’t think that hosting your bot on a web hosting server is going to work. Most web servers terminate scripts that are running for a longer time. Normally, I’d suggest to invest a few dollars per month and get an VPS. But those are not managed, which means you’d have to do everything yourself (packet installation and configuration, security stuff, …).