Viewing topic:Php irc bot log
Page: 1
Topic post 15-08-2008 - 3:43
Sorry to bother everyone again but im having a little trouble with php and irc!!!

Im trying to make my bot dump $ex in a log so i used this

$filename = "D:/xampp/htdocs/bots/wesbotlog.txt";
$insert = "$ex";
$myfile = @fopen($filename, "a" or die ("Could not create log";
@fwrite($myfile, $insert) or die ("Could not create log";

but all i get is the word array in the log over and over again... im guessing a have to specify which part of the ex i want logged since im getting the word array. How would i get all of $ex logged?
Topic post 15-08-2008 - 09:25
I would do something like:

php
1
2
3
4
5
6
7
8
9

$insert = " 
// Logline
1 - ".$ex[1]."
2 - ".$ex[2]."
3 - ".$ex[3]."
4 - ".$ex[4]."
5 - ".$ex[5]."
 
";
 

Ah well, at least you have to specify which array keys you would like to parse to the file.

©Copyrights Combined Minds. All rights reserved 2006 - 2008 : Disclaimer
Realized by www.Minna-Media.com