I am interested in finding (if anything to find) a script that will make it so I can veiw my weblogs from a browser. I currently can only look at them threw pico using my shell and it is kindof crazy looking. Anyone know of a way to do this
Printable View
I am interested in finding (if anything to find) a script that will make it so I can veiw my weblogs from a browser. I currently can only look at them threw pico using my shell and it is kindof crazy looking. Anyone know of a way to do this
ooh, i do this kind of stuff all the time...
in perl:
h4h4h4- that only took 2 minutes :DCode:print "Content-Type: text/html\n\n";
opendir(DIRECTORY, '.') or die ("Can't open DIRECTORY");
@DIRSCAN = readdir(DIRECTORY);
closedir DIRECTORY;
foreach (@DIRSCAN) {
if (/.htm/) { print "<a href=$_>$_</a>
";}
if (/.txt/) { print "<a href=$_>$_</a>
";}
if (/.php/) { print "<a href=$_>$_</a>
";}
if (/.pl/) { print "<a href=$_>$_</a>
";}
if (/.etc/) { print "<a href=$_>$_</a>
";}
}
i don't know if this is what you want? maybe i can still help?
Thank you.. I will try that for now. I just re read my post though and see where i messed up. What I meant to say was a php script that does this.... But if none this perl script will due just fine
Quote:
Originally posted here by Euclid
I am interested in finding (if anything to find) a script that will make it so I can veiw my weblogs from a browser. I currently can only look at them threw pico using my shell and it is kindof crazy looking. Anyone know of a way to do this
Check out www.hotscripts.com or www.sf.net for more detailed, bigger, scripts.PHP Code:<html>
<body>
<?php
$dir = @opendir(".");
$extention_array = array(
".txt$",
".log$",
".etc$"
);
$while( $file = @readdir($dir) )
{
if( ereg($extention_array, $file) )
{
echo('[url="'.$file.'"]'.$file.'[/url]
');
}
}
@closedir($dir);
?>
</body>
</html>
Am i doing something wrong?Quote:
Parse error: parse error, unexpected '{' in C:\...\dir.php on line 12
by the looks of it you have an extra { somwhere in your code
SittingDuck
wooops, sorry bout that. one dollar sign to much.
PHP Code:<?php
<html>
<body>
<?php
$dir = @opendir(".");
$extention_array = array(
".txt$",
".log$",
".etc$"
);
while( $file = @readdir($dir) )
{
if( ereg($extention_array, $file) )
{
echo('[url="'.$file.'"]'.$file.'[/url]
');
}
}
@closedir($dir);
?>
</body>
</html>
<?php
$dir = @opendir(".");
$extention_array = array(
".txt$",
".log$",
".etc$"
);
while( $file = @readdir($dir) )
{
if( ereg($extention_array, $file) )
{
echo(''.$file.'
');
}
}
@closedir($dir);
?>
What excatly should this do, i only get a white page
Am i doing something wrong ?
Plant this script in your log directory.
Or, if you have it in another directory, then change thetoPHP Code:$dir = @opendir(".");
PHP Code:$dir = @opendir("your_log_dir/somewhere_deeper/right_over_here/");