View Single Post
Bobby aka Dizzy

(-)(-)(-)(-)(-)istrator

Joined: Jan 2001

Posts: 1,560

Bobby aka Dizzy is doing well so far

Aug 16, 2007, 04:14 PM
Bobby aka Dizzy is offline
Reply With Quote
If anyone runs PHP on their local machine this code will generate the output like I did:

PHP Code:
<?php

$dir 
"c:\\games\\tsf\\cache\\";

// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
    if (
$dh opendir($dir)) {
        while ((
$file readdir($dh)) !== false) {
            if (
substr($file, -4) == ".j2l") {
              
$lastModified filemtime($dir $file);
              
$date date("m/d/Y h:i a"$lastModified);              
              
$fp fopen($dir $file"r");
              
fseek($fp188);
              
$levelname trim(fgets($fp32));
              
printf("%-30s%-23s%s\n"$file$date$levelname);
            }
        }
        
closedir($dh);
    }
}
?>