> "David" == David Gray <[EMAIL PROTECTED]> writes:
>> How do I get the IP address from a POST form.
>>
>> Let me make myself more clear: I have a form that uses POST,
>> and I would like to get users' IP address for avoiding the
>> same user to fake my pool's result.
David> You can check
> A user is not an IP address
> A user is not an IP address
> A user is not an IP address
Imagine if my mom were called 200.224.110.105. LOL.
Ok, good point, but my IP address approach will be enough, once my system
doensn't need to be very accurate. The data processing w
Could you help
My code's not doing everything
With the code below I'm trying to do the following:
-Open a file, creating it if necessary
-Print a name in file every time someone presses "enter"
-Print a new line
-Seek to the begining of file without closing file
-and print the file to STDOU
Hi all
My code below does the following :
- Reads from STDIN
- Splits the input on whitespace
- And prints the frequency of terms, with each term printed next to its frequency on
STDOUT.
I need another approach (code) to do the same things
#!/usr/bin/perl -w
my %freq;
while( my $line = ){
Hi Randal,
Nice of u to ring up an idea on the limitations of IP address.
But what do u suggest to be used as a validation tool for the users?
IP add + ramdom ports?
thanks!
- Original Message -
From: "Randal L. Schwartz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]
Could anyone help I am having trouble reading in information from STDIN
For coding see attached file
Using a while loop I want to do the following:
Read info in from STDIN
Read in any number of name/value pairs,
Read in names in pairs of two, and compute their sum.
Choose the maximum of all thos
Hi all,
I made the following script for parsing an html file and get the addresses,
but they are printed twice instead of only once each one.
Do you have any idea why?
Here is the script:
$file="C:\\Program Files\\Apache Group\\Apache\\htdocs\\linux.htm";
open (IN, "$file");
while () {
$line =
Try
$file="C:\\Program Files\\Apache Group\\Apache\\htdocs\\linux.htm";
open (IN, "$file") or die "Can't open $file: $!"; # ALWAYS CHECK OPENS
while () {
/.+<\/a>/; # This will act on the value of $_ which you
are setting with while ()
print "$1"; # You can combine this into one line
}
c
Hi Andrew,
Please read the perlsec man page (perldoc perlsec) to learn about -T.
If something still isn't clear, ask for some clarification.
@INC is an array Perl uses to hold a list of directories which it will
search for modules which are 'use'-ed or 'require'-ed.
perl -wle 'print $_ . "\n"
in article [EMAIL PROTECTED], Pedro A Reche
Gallardo at [EMAIL PROTECTED] wrote on 4/4/02 1:58 AM:
> Hi, I have found that when I upload files from a Mac and Windows the
> return character (maybe other characters too) are replaced by something
> else. Does any one know how to avoid this? or alter
I'm having problems with the old "Internal Server Error" issue. I know that
this is generally due to permissions. I have used chmod go+rx -R *, but no
joy. The html now works but not the cgi. Thoughts?
Thanks,
Adam
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
> "Rafael" == Rafael Cotta <[EMAIL PROTECTED]> writes:
Rafael> Ok, good point, but my IP address approach will be enough,
Rafael> once my system doensn't need to be very accurate.
Except that it will be frustrating to the second employee at
motorola.com who wants to vote after the first one
To continue Randal's point, you can have several hundred users accessing the
Internet through a single gateway, even without the random address and proxy
configuration that he describes. For instance, at my previous employer, we
had everyone on a shared connection through an Internet appliance wit
On 4/4/02 3:00 AM, Adam Bartley <[EMAIL PROTECTED]> wrote:
> Easy. Mac, Windows and Unix all use different endings to their lines. The
> Mac uses *both* the PC and the Unix form. Easiest is to download TexEdit,
> open your cgi files with it and use the quick convert option to turn it from
> Mac t
> Could anyone help I am having trouble reading in information
> from STDIN
>
> For coding see attached file
>
> Using a while loop I want to do the following:
> Read info in from STDIN
> Read in any number of name/value pairs,
> Read in names in pairs of two, and compute their sum.
> Choose th
> I'm having problems with the old "Internal Server Error"
> issue. I know that this is generally due to permissions. I
> have used chmod go+rx -R *, but no joy. The html now works
> but not the cgi. Thoughts?
Try inserting the line
use CGI::Carp (fatalsToBrowser);
At the beginning of your s
Why don't simply use cookie ? or when a page is open, redirect to :
youscript.cgi?ip=xxx.xxx.xxx.xxx&whateverParams=whateverVar
(you may use your way to encrypt ip & the ip address)
Or if you want to avoid duplicate click on Submit, you can use javascript
to disable the submit button when it click
> > "David" == David Gray <[EMAIL PROTECTED]> writes:
>
> >> How do I get the IP address from a POST form.
> >>
> >> Let me make myself more clear: I have a form that uses POST,
> >> and I would like to get users' IP address for avoiding the
> >> same user to fake my pool's result.
>
> Dav
Make it easy on yourself and others. Set a cookie that expires(tomorrow, or
whenever you'll have a new poll). Then only display the poll if the cookie
doesn't exist, if it does...show them the results. For 90%+ of your visitors
using cookies won't be a problem. If you check on IP you eliminate m
Hi. Does anyone know how to make a save button on a web page so that when a
client user clicks on it, a CGI program will send a text file to that
client?
Thanks,
Josiah
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Apple and IBM, Why can't we just get, A LONG.
This isn't a conversion program although it is a start, please email me
with the solution that you come up with.
# chartab1.pl: A program to display character tables
$Column = 1;
$Out = '';
for ($i = 33; $i<=126; $i++) {
$Out .= sprintf("%3s", $i
I have written the following script to let people download files from a web
browser without displaying the actual location, utilising a MySQL database.
It works ok, except that it renames the file download.cgi (the name of my
script). How can I make it keep the proper name?
No problem. I'll place a big sign on my website's main page banning AOL
users and Motorola employees...
Rafael
"Randal L. Schwartz" <[EMAIL PROTECTED]> escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > "Rafael" == Rafael Cotta <[EMAIL PROTECTED]> writes:
>
> Rafael> Ok, g
At 18:32 04/04/02, Randal wrote:
>Voting on the net is always a joke.
Like the man said. You can't prevent fraud, all you can do is choose what
level of inconvenience you want would-be-fraudulent users to go to. But if
the poll is over something that people aren't going to be too motivated
ab
I have cgi script that is INCLUDEd in a web page:
page.html:
The script prints out a form. When the form's method attribute is GET ie
, it works fine, but I want to process
a password, so I need to POST to page.html When I do, I get a 405 error:
The requested method POST is not allowed
Pedro,
for upload and/or download of text files you should use ftp in text
mode. This will convert the line endings automatically. Perl scripts are
text files. Therefore, perl scripts always should be up- and downloaded
in text mode.
Cheers
Stephan
--
Dipl.-Chem. Stephan Tinnemeyer
Lindenallee
On 4/4/02 10:41 AM, Josiah Altschuler <[EMAIL PROTECTED]> wrote:
Hi Josiah,
> Hi. Does anyone know how to make a save button on a web page so that when a
> client user clicks on it, a CGI program will send a text file to that
> client?
This has nothing to do with Perl. It's an HTML question.
On 4/4/02 9:16 AM, David R. Baird <[EMAIL PROTECTED]> wrote:
Hi David,
> I have cgi script that is INCLUDEd in a web page:
>
> page.html:
>
>
>
>
>
>
>
> The script prints out a form. When the form's method attribute is GET ie
>
I assume you mean 'method="get"' here.
> , it works fin
> "David" == David Gray <[EMAIL PROTECTED]> writes:
>> So again, I repeat:
>>
>> A user is not an IP address
>>
>> Get it through your head that using IP address for vote
>> blockout is just ... WRONG.
David> Message received, ZERO distortion. Are you saying, then, that it's
David> imposs
Ok say I have a file called news.txt and it included
this
---
Andrew|Tuesday|Blueberry's
Alex|Friday|Apple
Alyssa|Wednesday|Strawberry
---
Now, how can I have it so that when I call
print qq~
@fruit
~;
Hi,
I've tried the following script as you suggested, but it keep printing twice
each $1 variable.
The script:
#!c:\perl\bin\perl.exe -W
print "Content-type: text/html\n\n";
$file="C:\\Program Files\\Apache Group\\Apache\\htdocs\\linux.htm";
open (IN, "$file") or die "Can't open $file: $!";
wh
Hi all,
I want to make a script to parse an .html file for getting the web
addresses.
I know what regexp I need to use but I have a problem reading the file.
Some addresses are on 2 or more lines and I can't use the
while () {
and I think I need to use the read(FILE, $buffer, 1024) but I can't
Andrew Rosolino wrote:
> Ok say I have a file called news.txt and it included
> this
>
> ---
> Andrew|Tuesday|Blueberry's
> Alex|Friday|Apple
> Alyssa|Wednesday|Strawberry
> ---
>
> Now, how can I have it so that when I call
>
>
Hi all,
Do you know what is the difference between the SSI statements
include virtual ... and the address to the CGI script and
exec CGI ... and the address of the CGI script?
I've noticed that the second one it doesn't work. I think there are some
problems with the server configuration, or some
Hi all
My code below does the following :
- Reads from STDIN
- Splits the input on whitespace
- And prints the frequency of terms, with each term printed next to its frequency on
STDOUT.
I need another approach (code) to do the same things
#!/usr/bin/perl -w
my %freq;
while( my $line = ){
On Thu, 2002-04-04 at 15:01, Bruce Ambraal wrote:
> Hi all
>
> My code below does the following :
> - Reads from STDIN
> - Splits the input on whitespace
> - And prints the frequency of terms, with each term printed next to its frequency on
>STDOUT.
>
> I need another approach (code) to do the
Anyone's free to assist
Part 1 is already done just need assistance for part (2-4)
See below provided test data aswell
1)Read in any number of name/value pairs,
2)Read in names in pairs of two, and compute their sum.
3)Choose the maximum of all those pairs and print it.
4)At the same time ch
Thanx boris problem completely solved.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Why does my code not write the splitted words to STDOUT?
#!/usr/bin/perl -w
open (OUTPUT, ">ex92.out")||die;
my %freq;
while (my $line = ) {
foreach my $w ( split( /\s+/, $line ) ){
if( exists $freq{$w} ){
$freq{$w}++;
}else{
$freq{$w} = 1;
Because you don't have any print statements to STDOUT?
-Original Message-
From: Bruce Ambraal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 2:43 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Split input on whitespace
Why does my code not write the splitted words to
40 matches
Mail list logo