PHP Code Snippets by bone282
(7)
A bot i made for a friend who wanted to execute php strings with eval. I added a couple other functions aswell.
-------------
Commands:
.auth add <nick>
.auth del <nick>
.auth list
.join..
+ 4 likes
(PHP 5)
I just upgraded my bot from 4.3.3 to 5.2.9-1 yesterday and thought id play around with it.
Weather Underground handles IATA/ICAO Airport codes, ZIP codes, aswell as typing city, state/country.
For..
Tags:
simplexml
simplexml load file
+ 1 likes
This function will trim a string and leave the last word completely intact
Result:
This function will trim a string and leave the last word...
This function will trim a string and leave the last...
Global..
+ 0 likes
An extremely easy, and sometimes handy (especially with room bots
spamming large quantities of links in one go).
You might call it with something like this ($matches1['1'] = the url/s.)
if (strlen($matches1['1'])..
+ 0 likes
This just uses googles own calculator..
heres what the output looks like
[12:49][RandomUser] !calc 23*4/56^2/456+8999
[12:49][PHP_Bot] (((23 * 4) / (56^2)) / 456) + 8999 = 8999.00006
full instructions..
+ 1 likes
Scraping the classic fact generators. And a simple but effective use of array_rand.
Call 'do_RandomFacts' by either of the following:
do_RandomFacts("chuck");
do_RandomFacts("mrt..
+ 0 likes



