Hi,
should I use $ENV{HTTP_REFERER} to check wether a form was sent from my
site.
Because I don't want people to download my webpage, put a link to a form,
and modify some of the forms so it can crash the script.(eventough i tried
to protect from that).
The best way i can think of for the moment i
Hello, I've been trying to write a cgi script that will clear and restart
the printers on our server. We have 3 printers that just give me fits
running through a Linux server. I have no problem getting everything back
up and running on the command line but when I go on vacation the office
staff w
On 6/26/03 at 10:48 AM, [EMAIL PROTECTED] (anthony) wrote:
> Hi,
>
> should I use $ENV{HTTP_REFERER} to check wether a form was sent from
> my site. Because I don't want people to download my webpage, put a
> link to a form, and modify some of the forms so it can crash the
> script.(eventough i t
Rob,
The problem is in the permissions of the user id that is running the
script, not the owner of the script. In this case, your webserver is
the person running the script. So more than likely, you should use
'clearpq.cgi' to kick off a different script 'clearpl.pl' as ROOT. The
script should
> should I use $ENV{HTTP_REFERER} to check wether a form was sent from my
> site.
> Because I don't want people to download my webpage, put a link to a form,
> and modify some of the forms so it can crash the script.(eventough i tried
> to protect from that).
Enough error handling in your script
I have found CGI::FormBuilder a great way to do the validation for you.
First it ignores anything you didn't specifically ask for. Second, you can
easily validate using regexes. An additional benefit is that this module
provides client side (for legitimate users of your form), and server side
check
How would I go about saving the textarea of an HTML page to a text file?
Bob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 6/26/03 at 10:14 PM, [EMAIL PROTECTED] (Bob X) wrote:
> How would I go about saving the textarea of an HTML page to a text
file?
>
use CGI;
my $q = new CGI;
my $record = $q-param('text_field');
open(OUTFILE, ">output.txt") or die "Can't open output.txt: $!";
print OUTFILE
Wrong. Try:
use CGI;
my $q = new CGI;
my $record = $q->param('text_field');
open(OUTFILE, ">output.txt") or die "Can't open output.txt: $!";
print OUTFILE $record;
close OUTFILE;
Andrew Brosnan wrote:
On 6/26/03 at 10:14 PM, [EMAIL PROTECTED] (Bob X) wrote:
How would I go
Bare in mind that I am still a beginner at coding. Why is it "good
practice" to create an object when using CGI, rather than just diving
in?
For example:
use CGI ':standard';
my $q=new CGI;
my $input=$q->param('input');
and
use CGI ':standard';
my $input=param('input');
both put the contents o
> Bare in mind that I am still a beginner at coding. Why is it "good
> practice" to create an object when using CGI, rather than just diving
> in?
Maintainability.
> For example:
>
> use CGI ':standard';
> my $q=new CGI;
> my $input=$q->param('input');
>
> and
>
> use CGI ':standard';
> my $input
And if anyone tells me anything about the RequestHandler not being setup to
handle random URI's, I'll bite!
I'll fix that once I'm reasonable close ot done writing the dispatch table.
Eventually this beast will have SQL shoved into it and will begin making
database queries.
Thank you Randall Sch
You could escape them. That usualy works for me.
Example:
$dir= "\/\/ITC\/home\/techs";
Yes I know how sloppy that looks, but if it works and doesnt matter, why
worry bout it?
--
www.vadtec.net
[EMAIL PROTECTED]
"Susan Aurand" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> I
Camilo Gonzalez <[EMAIL PROTECTED]> top posted:
:
: Andrew Brosnan wrote:
:
: >use CGI;
: >my $q = new CGI;
: >my $record = $q-param('text_field');
: >open(OUTFILE, ">output.txt") or die "Can't open output.txt: $!";
: >print OUTFILE $record;
:
: Wrong. Try:
Besides the cl
14 matches
Mail list logo