in reply to CGI Parameters

Just to add to what the others have said, you might find this little script useful:
#!/usr/bin/perl use strict; use warnings; use CGI; use Data::Dumper; my $q = CGI->new(); my %var = $q->Vars(); my $log_file = '/path_to_log'; open(LOG,">>$log_file") || err("Can't open log file: $!"); print LOG "URL: $ENV{REQUEST_URI}\n\n", Dumper(\%var,\%ENV)."\n\n", '=' x 60, "\n\n"; print $q->header('text/plain'). "Everything's OK"; sub err { print $q->header('text/plain'). "ERROR: $_[0]"; exit(0); } exit(0);

Save that as MyScript.pl and set $log_file to point to a file that you can write to.

Then, when the script is called:

So, you can call it with various query string info to see what variables get set, and you can ask your manager to request the URL so that you can see exactly what HTTP header his request is sending.

Hope this is useful to get you started.

cLive ;-)

Update: added err() sub (oops :)

Replies are listed 'Best First'.
Re: Re: CGI Parameters
by Gerard (Pilgrim) on Jan 12, 2004 at 20:10 UTC
    Thanks Clive,
    I was thinking that would be the smartest way to go about it, and was going to write a script to do it, but you have just saved me a whole lot of time! Thanks
    Much thanks to all for their helpful comments. Gerard.