Thanks Sid, Appriciate the help. Sorry for long reply but been afk.
The method did not work right since I cant specify what $file= becasue it will change every .log.
This is what I have so far. Again.. its not working. Just a blank page.
$ftp = ftp_connect("domain") or die ("could not open ftp");
ftp_login($ftp, "user", "pass") or die ("could not open with user/pass");
$filelist = ftp_nlist($ftp, "/Logs")or die ("could not open dir");
$handle = (opendir('./Logs')) or die ("could not open logs dir");
while ($filename = readdir($handle))
{
if ( stristr($filename, ".log") )
{
$logcontent = fopen($filename, 'r');
foreach ( $logcontent as $line )
{
$words = explode (" ", $line);
if ( $words[2] . $words[3] == "loggedin" )
$nickname= $words[1];
$ip = $words[6];
echo "Nick = $nickname :: Ip = $ip<br />";
}
}
}
I have also attatched a simple .txt file of the .log. I just basically need the name and ip's from each log file.
Thanks again guys.