[Gllug] webalizer and dynamic pages (C question)

gllug at uncertainty.org.uk gllug at uncertainty.org.uk
Fri Nov 2 15:14:44 UTC 2001


Hi All,
	I need to generate some lovely html reports of various websites -
all of which are delivering dynamic php pages.

the problem is that webalizer strips the query strings from the result 

but I want 
/test.php?page=foo
and
/test.php?page=bar

to be counted as different pages

I have found the piece of code 
webalizer.c

         /* strip query portion of cgi scripts */
         
	 cp1 = log_rec.url;
	 while (*cp1 != '\0')
           if (!isurlchar(*cp1)) { *cp1 = '\0'; break; }
           else cp1++;
         if (log_rec.url[0]=='\0')
           { log_rec.url[0]='/'; log_rec.url[1]='\0'; }
	 

and commenting this out gets me part way - in fact too far

I actually want 

/test.php?page=foo&somevar=1
and
/test.php?page=foo&somevar=2

to be treated as the same page ! ie I am only interested in some 
(about 3) query string parameters.

I speak perl php javascript and some java - but not C !
 does anyone know what the *cp1 or '\0' is about ?

I have stuck the whole of webalizer.c on
http://uncertainty.demon.co.uk/webalizer.c

any help much appreciated - webalizer doesn't seem to have its own
mailing list, but if anyone knows of anything please let me know.

-- 

Sean  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 274 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20011102/5a527128/attachment.pgp>


More information about the GLLUG mailing list