Upgrade to Perl

2002-07-24 Thread Soheil Shaghaghi

Hi List,
I have been running Perl 5.6.0 for a while now, and today I decide to
upgrade to 5.6.1!
Everything works very good, but after the upgrade I can't see any changes to
the system!
I installed the upgrade in the same directory as Perl 5.6.0
Now, here are my problems, if anyone can please help me:
1. Perl still reports to be Version 5.6.0

2. I see so many Perl executables, and don't know which one the latest one
is, or what I should do at this point to get the server to report Perl to be
5.6.1

/usr/bin/perlCreated: 12/25/2000
/usr/bin/perl5  Created: 11/20/2000
/usr/bin/perl5.00503Created: 11/20/2000
/usr/bin/perl5.6.0Created: 12/25/2000

/usr/local/bin/perlCreated: 07/24/2002
/usr/local/bin/perl5.6.0 Created: 12/22/2000
/usr/local/bin/perl5.6.1 Created: 07/24/2002

3. Is there a configuration somewhere I need to change?


When I run perl -V, here is what I get:
perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
osname=freebsd, osvers=4.2-release, archname=i386-freebsd
uname='freebsd www.domain.com 4.2-release freebsd 4.2-release #0: mon
nov 20 13:02:55 gmt 2000 [EMAIL PROTECTED]:usrsrcsyscompilegeneric i386
'
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release)
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccflags ='-fno-strict-aliasing -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=true
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='gcc', ldflags ='-Wl,-E  -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lc -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fpic', lddlflags='-shared  -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under freebsd
  Compiled at Dec 25 2000 02:07:40
  @INC:
/usr/lib/perl5/5.6.0/i386-freebsd
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-freebsd
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: newbie: data structures

2002-07-24 Thread Vikrama Dhiman

ur mail title says data structure but ur problem doe not seem to 
be of the nature.
please be a little more clear.
store and retreive, there are as many options as u want.
what do u exactly r lookign for???
regards
vicki

On Wed, 24 Jul 2002 Anthony E. wrote :
>How would I store (and access) a table of
>information...assuming there is a unique key
>'email'...ie -
>
>These are the column names:
>email firstName lastName phone address1
>
>"[EMAIL PROTECTED]" "Joe Blow" "415-555-" "123
>Mayberry"
>
>"[EMAIL PROTECTED]"  "John Doe" "619-555-5551" "456 Happy
>Ln."
>
>etc...etc...
>(also some of the fields will be null from time to
>time).
>
>
>
>__
>Do You Yahoo!?
>Yahoo! Health - Feel better, live better
>http://health.yahoo.com
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: newbie: data structures

2002-07-24 Thread Wiggins d'Anconia

This is a very broad question, so giving a specific answer is difficult 
to say the least, but since no one else has responded I will provide at 
least this much

You are going to want to be looking at using a "hash of hashes" 
essentially you create a hash where each key is the email address (which 
you will be looking up on) and the value associated with that key is 
itself a hash.

Here is one place to start:
http://www.wdvl.com/Authoring/Languages/Perl/PerlfortheWeb/hash_of_hashes.html

Or there are examples of these types of structures in the Camel, 
Advanced Perl Programming, and possibly the other perl related O'Reilly 
books.

Good luck.

http://danconia.org



Anthony E. wrote:
> How would I store (and access) a table of
> information...assuming there is a unique key
> 'email'...ie -
> 
> These are the column names:
> email firstName lastName phone address1
> 
> "[EMAIL PROTECTED]" "Joe Blow" "415-555-" "123
> Mayberry"
> 
> "[EMAIL PROTECTED]"  "John Doe" "619-555-5551" "456 Happy
> Ln."
> 
> etc...etc...
> (also some of the fields will be null from time to
> time).
> 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Checking if a file is downloading

2002-07-24 Thread Wiggins d'Anconia

I am resending this to the list so that they may also help, in the 
future be sure to group reply so that happens as they may be able to 
help where I can't.

See inline comments...

Octavian Rasnita wrote:
> Hi,
> 
> I think that if I would do that, it will happend something like:
> 
> 1. The visitor will activate the script.
> 2. The script will create the lock file and it will print the file to the
> browser.
> 3. The visitor will be asked if they want to save the file.
> 4. They will answer yes, and the download will begin.
> 5. The visitor will close the browser, or they will move to another page
> while the file is downloading.

If you are using the cgi script to print the binary of the file (as 
opposed to redirecting to it, etc.) in other words the script is acting 
like a pipe, then while that pipe is open (they are downloading the 
file) then the script is still running and the lock file will still 
exist, and hence you know they are downloading.


> 6. If the download is cancelled, the lock file from the server is not
> deleted.

It is my understanding (help me here group) that the browser would send 
a signal to the server that it doesn't want anymore data which would 
then end the print and the rest of the code would be executed and the 
lock file deleted, however if this is not the case, you *should* be able 
to no matter what call an (is it?) END block that will be executed *no 
matter what* happens before the perl interpreter destroys the process 
which is then where you could handle your removal of the lock file.


> In fact, I am not sure if the file is deleted, even though the download is
> completed.
> 

   When they are finished downloading the file, aka the information has 
finished printing, then control will return to the code immediately 
following the print (download of the file) which is where you can then 
unlink the download, or simulate it finishing.  Again this can *always* 
be handled in the block that is executed whenever the process 
terminates, if the lock isn't removed prior to taht point.


> Please tell me if I am wrong.
> 
> In fact, after downloading, I want to delete the real file, not only the
> lock file.
>

If you can get one to delete, the other is obvious.


> Thank you.
> 
> Teddy Center: http://teddy.fcc.ro/
> Mail: [EMAIL PROTECTED]
> 
> - Original Message -
> From: "Wiggins d'Anconia" <[EMAIL PROTECTED]>
> To: "Octavian Rasnita" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 24, 2002 4:47 AM
> Subject: Re: Checking if a file is downloading
> 
> 
> 
>>There may be a direct way but I am not aware of it.  As a proposed
>>solution you could have the user call a perl script that has the
>>following steps:
>>
>>1) create a lock file (or something similar)
>>2) open the file that is to be downloaded
>>3) print the proper header for that file type
>>4) print the file
>>5) remove the lock file
>>
>>Since the data in the file is being passed through the perl script at
>>the point before the lock file is removed, as long as that download is
>>occuring the file will exist, so then checking for the file would tell
>>you if it is being downloaded... (watch out for browser time outs,
>>they shouldn't happen but you should test this!)
>>
>>Obviously you could make a dynamic named lock file, etc. to do things
>>like tracking who is doing the downloading, how many, etc.  This also
>>depends on teh size of the downloadable file, I am assuming you are
>>talking about a sizeable download.
>>
>>Hope this helps,
>>
>>http://danconia.org
>>
>>
>>Octavian Rasnita wrote:
>>
>>>Hi all,
>>>
>>>I want to check if a certain file is downloading  in this moment by a
>>
> page
> 
>>>visitor.
>>>Is it possible with Perl?
>>>
>>>I want to tell me true if the file is in the downloading process, and
>>
> false
> 
>>>if the download has finished.
>>>
>>>Thank you.
>>>I hope it is possible.
>>>
>>>Teddy Center: http://teddy.fcc.ro/
>>>Mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>>
> 
> 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Finding the country

2002-07-24 Thread Hytham Shehab

Randal L. Schwartz wrote:
> If you're using it to force the language of the page, no.  Use the
> browser specification instead.

thanks v. much for that Randal, but *how* ?
how i can use the browser specification?

--
Hytham Shehab




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: question about cgi-lib.pl

2002-07-24 Thread Randal L. Schwartz

> "Michal" == Michal Simovic <[EMAIL PROTECTED]> writes:

Michal> I'd like to ask how to tell perl script to use
Michal> cgi-lib.pl and where cgi-lib.pl should be placed.

cgi-lib.pl can be found in /dev/null.

As in, don't use it.

If you have code that uses it, see "perldoc CGI" and look for the part
where it refers to cgi-lib compatibility.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Finding the country

2002-07-24 Thread Randal L. Schwartz

> "Octavian" == Octavian Rasnita <[EMAIL PROTECTED]> writes:

Octavian> Is it possible to find out the country of my web page
Octavian> visitors using a Perl script?

Octavian> I would like to find the IP address of the visitor ISP, or
Octavian> something else that can help me to find the country.

If you're just curious, yes.  You can get something that's right
about 75% of the time.

If you're using it to force the language of the page, no.  Use the
browser specification instead.

If you're using it to restrict distribution to certain countries, no.
Because it's wrong 25% of the time, and can also be easily spoofed.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Two Questions

2002-07-24 Thread Omar Shariff

Thanks Connie and Bob for answer too fast!!! i'm very
stupid i try all things except that well thanks so
much!!!

I read perldoc perlcc but its for unix, i think works
for win but i need the libs... i'm still searching

Gonzalo

Ahora podés usar Yahoo! Messenger desde tu celular. Aprendé cómo hacerlo en Yahoo! 
Móvil: http://ar.mobile.yahoo.com/sms.html

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Checking if a file is downloading

2002-07-24 Thread zentara

>> -Original Message-
>> From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
>> 
>> I want to check if a certain file is downloading  in this 
>> moment by a page
>> visitor.
>> Is it possible with Perl?

Another option which is widely used is to have a cgi-script
do the file "download", by printing the binary out. That way
you can closely monitor the file downloads.  I just printed to
a log, but you could do anything you want. You could have a 
cgi program, which checks this log, and tail it. 
Then "if ($tail =~ /downloading/){print "downloading now\n"}

Of course you will need to work out what happens if 2 or more
users are downloading at the same time.
  
###
#!/usr/bin/perl
$file = 'test.tgz';
open (LOG,">>test-tgz.log") or die "Couldn't open log: $!";
print LOG "downloading now,  start: ",scalar localtime(),"\t",
$ENV{REMOTE_ADDR},"\n";

print<){print}
close (FH);

print LOG "downloading finished, stop: ",scalar localtime(),"\t",
$ENV{REMOTE_ADDR},"\n";
close LOG;

exit 0;
##



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Two Questions

2002-07-24 Thread Bob Showalter

> -Original Message-
> From: Omar Shariff [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 9:03 AM
> To: [EMAIL PROTECTED]
> Subject: Two Questions
> 
> 
> Hi, i've two questions (problems...)
> 1.- I've perl for windows (active perl) when i try to
> do a line command it's doesn't work! i do something
> like this:
> D:\>perl -e 'for(1..300)sleep 1;print STDERR ".";'
> 
> and i receive this answer!!!:
> Can't find string terminator "'" anywhere before EOF
> at -e line 1.
> i receive this always... (HELP!!!)

Welcome to Windoze! Their shell recognizes double quotes only.

You're also missing some braces. Try it like this:

   D:\>perl -e "for(1..300){sleep 1;print STDERR '.'}"

> 
> 2.- how can i make a exe file?? i put perlcc but when
> compiles give me a lot of errors, not found *.lib
> (kernel32.lib, etc)

I dunno.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Two Questions

2002-07-24 Thread Connie Chan

> 1.- I've perl for windows (active perl) when i try to
> do a line command it's doesn't work! i do something
> like this:
> D:\>perl -e 'for(1..300)sleep 1;print STDERR ".";'

It could be : 
perl -e "sleep 1 for (1..300) ; print STDERR '.'"
or 
perl -e "for (1..300){sleep 1 } print STDERR \".\""

you can't start in this way by -e '..'

Rgds,
Connie



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Two Questions

2002-07-24 Thread Omar Shariff

Hi, i've two questions (problems...)
1.- I've perl for windows (active perl) when i try to
do a line command it's doesn't work! i do something
like this:
D:\>perl -e 'for(1..300)sleep 1;print STDERR ".";'

and i receive this answer!!!:
Can't find string terminator "'" anywhere before EOF
at -e line 1.
i receive this always... (HELP!!!)

2.- how can i make a exe file?? i put perlcc but when
compiles give me a lot of errors, not found *.lib
(kernel32.lib, etc)

Gonzalo

PD gracias a los que me ayudaron con lo del
interprete, muy bueno lo del recDescend pero
casualmente lo que tengo que programar para la
facultad es algo similar a eso

Ahora podés usar Yahoo! Messenger desde tu celular. Aprendé cómo hacerlo en Yahoo! 
Móvil: http://ar.mobile.yahoo.com/sms.html

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Web tools

2002-07-24 Thread Samuel Yip

> Thks for your advise.
> The problem I have encountered was running the following script.
> -
> #!/perl/bin/
> use CGI qw/:standard/;
> use Net::Ping;
> $q=new CGI;
> $z=Net::Ping->new("icmp");
> $host="1.21.83.8";
> $x=0;
>
> print  $q->header(-type=>'text/html'),
>  $q->start_html('hello world');
>
> while ($x<3){
> print "$host is ";
> print " NOT " unless $z->ping($host,2);
> print " Alive","";
> $x++;
> }
> print $q->end_html;
>
>> ---
>
> Though the script does print out the result, but the result was print out
> only after it has completed the iteration.  I was expecting that it will
> print out the result one after another so that the user would not think
that
> the server is not responsing.
>


<[EMAIL PROTECTED]> wrote in message
00ba01c23278$a62174f0$d381f6cc@david">news:00ba01c23278$a62174f0$d381f6cc@david...
> Samuel,
> Well, you could hop on cpan.org and find yourself a module that will
do the ping for you, or you
> could use a less proper method like the following:
>
> -
> # pretend you got $ipaddress through CGI.pm or something like that
> print "Content-Type: text/html\n\n";
> my $result = `ping -c 1 $ipaddress`;
> if ($result =~ /1 packets? received/){
> # ping successful
> print "Ping Successful, Result:\n" . $result;
> } else {
> # ping failed
> print "Ping Failed, Result:\n" . $result;
> }
> -
>
> Regards,
> David
>
>
>
> - Original Message -
> From: "Samuel Yip" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 23, 2002 7:01 AM
> Subject: Web tools
>
>
> Hi,
>
> I am new to perl and would like to use perl to do the following:
>
> 1. Prompt the user for a IP address.
> 2. Ping the IP address from the web server and
> 3. Print out the result to the user on the browser.
>
> Anyone knows how should I do it ?
>
> Thks
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Members area

2002-07-24 Thread Yasen Petrov

Look at this file with links. They will help a lot.

"Jonathan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I would like to allow members to manage their accounts on-line.
I need a resource that explains each 'security' method, and discusses the
pros and cons of each. Do you know of any books or tutorials that do this?
Or at least provide a list of the different options?



begin 666 CGI Security.htm
M/"%$3T-465!%($A434P@4%5"3$E#("(M+R]7,T,O+T141"!(5$U,(#0N,"!4
M2\@
M+2T^#0H\2%1-3#X\2$5!1#X\5$E43$4^0T=)(%-E8W5R:71Y/"]4251,13X-
M"CQ-151!(&AT=' M97%U:78]0V]N=&5N="U4>7!E(&-O;G1E;G0](G1E>'0O
M:'1M;#L@8VAA2!G86UE('1H870G2!O;B!T:&ES(&EN9F]R;6%T:6]N(&%T('EO=7(@;W=N(')I2!B96-A=7-E(&ET)W,@3PO03X@*$QI;F-O;&X@4W1E:6XI( T*(" \3$D^/$$@:')E9CTB:'1T<#HO
M+W=W=RYC3PO03X@*$UI8VAA96P@5F%N($)I97-B6]U(&MN;W<@;V8@;W1H97(@<&QA8V5S
M(&%D9')E2P@<&QE87-E
M( T*


newbie: data structures

2002-07-24 Thread Anthony E.

How would I store (and access) a table of
information...assuming there is a unique key
'email'...ie -

These are the column names:
email firstName lastName phone address1

"[EMAIL PROTECTED]" "Joe Blow" "415-555-" "123
Mayberry"

"[EMAIL PROTECTED]"  "John Doe" "619-555-5551" "456 Happy
Ln."

etc...etc...
(also some of the fields will be null from time to
time).



__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Finding the country

2002-07-24 Thread fliptop

Scot Robnett wrote:

> I'm assuming your best bet would be to find the IP using the first line of a
> ping or traceroute and regex-ing out the extraneous stuff, then using
> 'whois -a' (which does an ARIN search) and extracting the 4th line to get
> the country.
> 
> Anybody have any easier/faster ideas?


use this lookup hash.  this list is available at

http://www.iana.org/assignments/ipv4-address-space


 my %IPS = (
 '0'   => 'IANA - Reserved',
 '1'   => 'IANA - Reserved',
 '2'   => 'IANA - Reserved',
 '3'   => 'General Electric Company',
 '4'   => 'Bolt Beranek and Newman Inc.',
 '5'   => 'IANA - Reserved',
 '6'   => 'Army Information Systems Center',
 '7'   => 'IANA - Reserved',
 '8'   => 'Bolt Beranek and Newman Inc.',
 '9'   => 'IBM',
 '10'  => 'IANA - Private Use',
 '11'  => 'DoD Intel Information Systems',
 '12'  => 'AT&T Bell Laboratories',
 '13'  => 'Xerox Corporation',
 '14'  => 'IANA - Public Data Network',
 '15'  => 'Hewlett-Packard Company',
 '16'  => 'Digital Equipment Corporation',
 '17'  => 'Apple Computer Inc.',
 '18'  => 'MIT',
 '19'  => 'Ford Motor Company',
 '20'  => 'Computer Sciences Corporation',
 '21'  => 'DDN-RVN',
 '22'  => 'Defense Information Systems Agency',
 '23'  => 'IANA - Reserved',
 '24'  => 'ARIN - Cable Block',
 '25'  => 'Royal Signals and Radar Establishment',
 '26'  => 'Defense Information Systems Agency',
 '27'  => 'IANA - Reserved',
 '28'  => 'DSI-North',
 '29'  => 'Defense Information Systems Agency',
 '30'  => 'Defense Information Systems Agency',
 '31'  => 'IANA - Reserved',
 '32'  => 'Norsk Informasjonsteknologi',
 '33'  => 'DLA Systems Automation Center',
 '34'  => 'Halliburton Company',
 '35'  => 'MERIT Computer Network',
 '36'  => 'IANA - Reserved',
 '37'  => 'IANA - Reserved',
 '38'  => 'Performance Systems International',
 '39'  => 'IANA - Reserved',
 '40'  => 'Eli Lily and Company',
 '41'  => 'IANA - Reserved',
 '42'  => 'IANA - Reserved',
 '43'  => 'Japan Inet',
 '44'  => 'Amateur Radio Digital Communications',
 '45'  => 'Interop Show Network',
 '46'  => 'Bolt Beranek and Newman Inc.',
 '47'  => 'Bell-Northern Research',
 '48'  => 'Prudential Securities Inc.',
 '49'  => 'Joint Technical Command',
 '50'  => 'Joint Technical Command',
 '51'  => 'Deparment of Social Security of UK',
 '52'  => 'E.I. duPont de Nemours and Co., Inc.',
 '53'  => 'Cap Debis CCS',
 '54'  => 'Merck and Co., Inc.',
 '55'  => 'Boeing Computer Services',
 '56'  => 'U.S. Postal Service',
 '57'  => 'SITA',
 '58'  => 'IANA - Reserved',
 '59'  => 'IANA - Reserved',
 '60'  => 'IANA - Reserved',
 '61'  => 'APNIC - Pacific Rim',
 '62'  => 'RIPE NCC - Europe',
 '63'  => 'ARIN',
 '64'  => 'ARIN',
 '65'  => 'ARIN',
 '66'  => 'ARIN',
 '67'  => 'ARIN',
 '68'  => 'ARIN',
 '69'  => 'IANA - Reserved',
 '70'  => 'IANA - Reserved',
 '71'  => 'IANA - Reserved',
 '72'  => 'IANA - Reserved',
 '73'  => 'IANA - Reserved',
 '74'  => 'IANA - Reserved',
 '75'  => 'IANA - Reserved',
 '76'  => 'IANA - Reserved',
 '77'  => 'IANA - Reserved',
 '78'  => 'IANA - Reserved',
 '79'  => 'IANA - Reserved',
 '80'  => 'RIPE NCC',
 '81'  => 'RIPE NCC',
 '82'  => 'IANA - Reserved',
 '83'  => 'IANA - Reserved',
 '84'  => 'IANA - Reserved',
 '85'  => 'IANA - Reserved',
 '86'  => 'IANA - Reserved',
 '87'  => 'IANA - Reserved',
 '88'  => 'IANA - Reserved',
 '89'  => 'IANA - Reserved',
 '90'  => 'IANA - Reserved',
 '91'  => 'IANA - Reserved',
 '92'  => 'IANA - Reserved',
 '93'  => 'IANA - Reserved',
 '94'  => 'IANA - Reserved',
 '95'  => 'IANA - Reserved',
 '96'  => 'IANA - Reserved',
 '97'  => 'IANA - Reserved',
 '98'  => 'IANA - Reserved',
 '99'  => 'IANA - Reserved',
 '100' => 'IANA - Reserved',
 '101' => 'IANA - Reserved',
 '102' => 'IANA - Reserved',
 '103' => 'IANA - Reserved',
 '104' => 'IANA - Reserved',
 '105' => 'IANA - Reserved',
 '106' => 'IANA - Reserved',
 '107' => 'IANA - Reserved',
 '108' => 'IANA - Reserved',
 '109' => 'IANA - Reserved',
 '110' => 'IANA - Reserved',
 '111' => 'IANA - Reserved',
 '112' => 'IANA - Reserved',
 '113' => 'IANA - Reserved',
 '114' => 'IANA - Reserved',
 '115' => 'IANA

Re: Finding the country

2002-07-24 Thread David T-G

Teddy --

...and then Octavian Rasnita said...
% 
% Hello all,

Hi!


% 
...
% I would like to find the IP address of the visitor ISP, or something else
% that can help me to  find the country.

That's easy; just use %ENV{REMOTE_ADDR} as Apache hands it to you.


HTH & HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg05989/pgp0.pgp
Description: PGP signature


RE: Finding the country

2002-07-24 Thread Scot Robnett

I'm assuming your best bet would be to find the IP using the first line of a
ping or traceroute and regex-ing out the extraneous stuff, then using
'whois -a' (which does an ARIN search) and extracting the 4th line to get
the country.

Anybody have any easier/faster ideas?

Scot R.
inSite




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: HTTP_REFERER

2002-07-24 Thread Shao-Ju Chao

Thanks for the precious information. I've sent a request to paypal asking for
suggestions. I will post to the list once I got the answer.

--- Bob Showalter <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Shao-Ju Chao [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 24, 2002 9:49 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: HTTP_REFERER
> > 
> > 
> > Thanks. I was setting up some Paypal stuff and want to make 
> > sure that the user is
> > actually coming from Paypal (https://www.paypal.com.) and 
> > then come to my web page to
> > ativate their account. The "return" link is on Paypal and 
> > when they click the link and
> > return, I checked the HTTP_REFERER and expect it to be 
> > "https://www.paypal.com..."; but it
> > wasn't. 
> 
> Per RFC 2616, clients are not supposed to send a Referer header
> in a non-secure request when the referring page used a secure
> transfer (https).
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


=
Shao-Ju Chao (Bruce)
Do you Survey!?
Go to http://www.surveyanywhere.com and create your own survey.


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: HTTP_REFERER

2002-07-24 Thread perl-dvd

Well, there you have it Shao-Ju.  Hey, I learned something new today.  Cool.




- Original Message - 
From: "Bob Showalter" <[EMAIL PROTECTED]>
To: "'Shao-Ju Chao'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 7:56 AM
Subject: RE: HTTP_REFERER


> -Original Message-
> From: Shao-Ju Chao [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: HTTP_REFERER
> 
> 
> Thanks. I was setting up some Paypal stuff and want to make 
> sure that the user is
> actually coming from Paypal (https://www.paypal.com.) and 
> then come to my web page to
> ativate their account. The "return" link is on Paypal and 
> when they click the link and
> return, I checked the HTTP_REFERER and expect it to be 
> "https://www.paypal.com..."; but it
> wasn't. 

Per RFC 2616, clients are not supposed to send a Referer header
in a non-secure request when the referring page used a secure
transfer (https).

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: HTTP_REFERER

2002-07-24 Thread Bob Showalter

> -Original Message-
> From: Shao-Ju Chao [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: HTTP_REFERER
> 
> 
> Thanks. I was setting up some Paypal stuff and want to make 
> sure that the user is
> actually coming from Paypal (https://www.paypal.com.) and 
> then come to my web page to
> ativate their account. The "return" link is on Paypal and 
> when they click the link and
> return, I checked the HTTP_REFERER and expect it to be 
> "https://www.paypal.com..."; but it
> wasn't. 

Per RFC 2616, clients are not supposed to send a Referer header
in a non-secure request when the referring page used a secure
transfer (https).

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: HTTP_REFERER

2002-07-24 Thread Bob Showalter

> -Original Message-
> From: Shao-Ju Chao [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 9:38 AM
> To: [EMAIL PROTECTED]
> Subject: HTTP_REFERER
> 
> 
> I was trying to get referer information from 
> $ENV{'HTTP_REFERER'} but always got empty
> string. Is this env variable supported by apache server (on 
> linux)? Thanks.

Apache sets HTTP_REFERER from the Referer request header. But
you cannot force the client to sent a Referer header, so you
need to be careful about building assumptions around it.

See also section 15.1.2 and 15.1.3 of RFC 2616

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: HTTP_REFERER

2002-07-24 Thread Shao-Ju Chao

Thanks. I was setting up some Paypal stuff and want to make sure that the user is
actually coming from Paypal (https://www.paypal.com.) and then come to my web page 
to
ativate their account. The "return" link is on Paypal and when they click the link and
return, I checked the HTTP_REFERER and expect it to be "https://www.paypal.com..."; but 
it
wasn't. 

--- [EMAIL PROTECTED] wrote:
> Shao-Ju,
> Yes, but it does not exist when there was no referer.  So, for example, if 
>somebody
> just went
> strait to test.pl, it would not have a referer, but if somebody went to test.html 
>which
> had a link
> to test.pl, then you would have a referer which would be the url of test.html
> 
> Regards,
> David
> 
> 
> - Original Message -
> From: "Shao-Ju Chao" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 24, 2002 7:37 AM
> Subject: HTTP_REFERER
> 
> 
> I was trying to get referer information from $ENV{'HTTP_REFERER'} but always got 
>empty
> string. Is this env variable supported by apache server (on linux)? Thanks.
> 
> 
> =
> Shao-Ju Chao (Bruce)
> Do you Survey!?
> Go to http://www.surveyanywhere.com and create your own survey.
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


=
Shao-Ju Chao (Bruce)
Do you Survey!?
Go to http://www.surveyanywhere.com and create your own survey.


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: HTTP_REFERER

2002-07-24 Thread Richie Crews

referer is only set if you are linked from another site, are you sure
its being set? And yes its supported by apache (any os).

On Wed, 2002-07-24 at 09:37, Shao-Ju Chao wrote:
> I was trying to get referer information from $ENV{'HTTP_REFERER'} but always got 
>empty
> string. Is this env variable supported by apache server (on linux)? Thanks.
>   
> 
> =
> Shao-Ju Chao (Bruce)
> Do you Survey!?
> Go to http://www.surveyanywhere.com and create your own survey.
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=

Richie Crews

Unix Administrator / Internet Integrator

Email: [EMAIL PROTECTED]

Cell: (706) 773 - 3436
Desk: (706) 634 - 3681
Fax: (706) 634 - 3831

~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: HTTP_REFERER

2002-07-24 Thread perl-dvd

Shao-Ju,
Yes, but it does not exist when there was no referer.  So, for example, if 
somebody just went
strait to test.pl, it would not have a referer, but if somebody went to test.html 
which had a link
to test.pl, then you would have a referer which would be the url of test.html

Regards,
David


- Original Message -
From: "Shao-Ju Chao" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 7:37 AM
Subject: HTTP_REFERER


I was trying to get referer information from $ENV{'HTTP_REFERER'} but always got empty
string. Is this env variable supported by apache server (on linux)? Thanks.


=
Shao-Ju Chao (Bruce)
Do you Survey!?
Go to http://www.surveyanywhere.com and create your own survey.


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




HTTP_REFERER

2002-07-24 Thread Shao-Ju Chao

I was trying to get referer information from $ENV{'HTTP_REFERER'} but always got empty
string. Is this env variable supported by apache server (on linux)? Thanks.
  

=
Shao-Ju Chao (Bruce)
Do you Survey!?
Go to http://www.surveyanywhere.com and create your own survey.


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Finding the country

2002-07-24 Thread Octavian Rasnita

Hello all,

Is it possible to find out the  country of my web page visitors using a Perl
script?

I would like to find the IP address of the visitor ISP, or something else
that can help me to  find the country.

I don't know how to find it if the visitor uses a .net or .com address.

Thank you.

Teddy Center: http://teddy.fcc.ro/
Mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Checking if a file is downloading

2002-07-24 Thread Bob Showalter

> -Original Message-
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 6:03 AM
> To: [EMAIL PROTECTED]
> Subject: Checking if a file is downloading
> 
> 
> Hi all,
> 
> I want to check if a certain file is downloading  in this 
> moment by a page
> visitor.
> Is it possible with Perl?
> 
> I want to tell me true if the file is in the downloading 
> process, and false
> if the download has finished.
> 
> Thank you.
> I hope it is possible.

If you are using Apache, you can use "apachectl fullstatus" and
parse that output to see what requests are being served.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]