irc php,PHP IRC BOT不会连接

2年前它工作了,现在开始出现一些不正确的错误,我找不到它为什么没有工作的答案:

$this->BotSocket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);

if (!$this->BotSocket) {

die('Socket error1 : '.socket_strerror(socket_last_error()));

}

/**

* Bind the socket to make it irc'able

*/

if(!socket_bind($this->BotSocket, $this->BotConfig['hostname'])) {

die('Socket error2 : '.socket_strerror(socket_last_error()));

}

if(!socket_connect($this->BotSocket, $this->BotConfig['server'], $this->BotConfig['port'])) {

die('Socket error3 : '.socket_strerror(socket_last_error()));

}

和连接字符串:

$this->BotConfig = array(

/**

* Bot configuration for information

*/

'nickname' => 'Muts',

'realname' => 'Vii personal funbot',

'ident' => 'Muts',

/**

* Bot server configration

*/

'hostname' => 0,

'server' => 'OGN2.OnlineGamesNet.net',

'port' => 6667,

(数组中有更多关闭正确)

和我得到的错误:

警告:socket_connect()[function.socket-connect]:无法连接[110]:连接在第225行的/home/patrick/domains/xxxx/public_html/muts/bot.php中超时

套接字错误3:连接超时

任何人都可以帮我解决这个问题吗?

也值得注意:

- 使用telnet进行相同的连接设置

- 使用mIRC进行相同的连接设置

- 它正在运行一个网络服务器(外部而非本地计算机)

主持人的结果:OGN2.OnlineGamesNet.net是ogn2.ogamenet.net的别名。 ogn2.ogamenet.net的地址为79.110.87.154 - traceroute:traceroute to 79.110.87.154(79.110.87.154),最大30跳,40字节数据包

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值