View Single Post
Old 04-30-2004   #14 (permalink)
Hornet
Registered User
 
Hornet's Avatar
 
Join Date: Nov 2003
Location: Hiding in a ditch with a stolen laptop, somewhere in the South of England.
Posts: 66

I've now solved the referrer and the log file problems, but the ASCII and PNG issues still need to be sorted, so some input would most useful.

I doubt this'll get a reply for ages, if at all, the Biorust forums being the paradox that they are, but I'm trying to amalgamate a collection of counter files into one large file. I'm using |> as a seperator, and I've got such a headache I can scarcely think to type let alone dig out PHP snippets for you, but this should be the right bit:

PHP Code:
$test="fish";
$wfile file("count.db");
$i 0;
echo (
"$test");
echo (
"$file");
echo (
"$count");
echo (
"<br><br>");
foreach(
$wfile as $value)
{
IF(
$value)
{
list(
$file,$count) = explode("|>"$value);
echo (
"$file");
echo (
"$count");
if (
$file == $test) { print "I am $test";  } else { print "asd "; }
echo (
"<br><br>");
$i++;
}

Actually, it looks looks like one of my test files, but it'll do to give you an idea of how the thing's structured. Basically, how can I only change one line in the database? There are about 100 entries in all, so I'd prefer not to loop through everything and 'if' it to death scanning for the right line, then write the entire file back to itself with the exception of that one line. There must be an easier way...
__________________
De Profundis, Sed Non Satatia.
Hornet is offline