X-Static Codes
Chat to Us @
SNM Chat
in #X-Static
Home
|
Contact
Login
Register
Search
Scripting
Snippets
Tutorials
Competitions
Links
Memberlist
Pastebin
Affiliates
Contact Admin
Sponsors
Nameless
Official #nameless website
Rooted.in
I got Rooted did you?
Stats
Total Members: 56
Newest User: Nofilicity
Snippets Added: 153
View
PHP IRC Bot
Snippet Author:
FURBY
Rated:
Snippet Description:
Just my PHP IRC Bot
<?php // Prevent PHP from stopping the script after 30 sec set_time_limit(0); $socket = fsockopen("127.0.0.1", 6667); fputs($socket,"USER Furbs[PHP] Furbs[PHP] Furbs[PHP] :Furbs[PHP]\n"); fputs($socket,"NICK Furbs[PHP]\n"); $chan = "#php"; $owner = "YOUR-NICK"; fputs($socket,"JOIN ".$chan."\n"); while(1) { while($data = fgets($socket, 128)) { echo nl2br($data); flush(); $ex = explode(' ', $data); $rawcmd = explode(':', $ex[3]); $oneword = explode('<br>', $rawcmd); $channel = $ex[2]; $nicka = explode('@', $ex[0]); $nickb = explode('!', $nicka[0]); $nickc = explode(':', $nickb[0]); if($ex[0] == "PING"){ fputs($socket, "PONG ".$ex[1]."\n"); } $args = NULL; for ($i = 4; $i < count($ex); $i++) { $args .= $ex[$i] . ' '; } if ($rawcmd[1] == "!sayit") { fputs($socket, "PRIVMSG ".$channel." :".$args." \n"); } elseif ($rawcmd[1] == "!md5") { fputs($socket, "PRIVMSG ".$channel." :MD5 ".md5('$args')."\n"); } if ($nick == $owner) { if ($rawcmd[1] == "!eval"){ eval($args); } elseif ($rawcmd[1] == "!die") { fputs($socket, "QUIT :".$args."\n"); } elseif ($rawcmd[1] == "!join") { fputs($socket, "JOIN :".$args."\n"); } } } } ?>
Favorite Script
-
Smilies
Message:
Comments: