For July's javascript stat try
http://www.thecounter.com/stats/2002/July/javas.php
For any month statistics with javascript, java, os's, browsers, resolutions,
colordepth's
http://www.thecounter.com/stats/
(note, after clicking on the month, notice the yellow area on the right for choosing
the
Jimmy,
Sorry I had not read this post before I replied to the other.
You need the permissions on a folder to be readable and executable in order for people
to read what
is in that folder period (not just execute scripts). So your folder needs to be
permissions 755.
Your script must be read
Jimmy,
Do you know html? In html you use "" (without the quotes) to display a line
break.
Personally, because of some reasoning's people have presented to me, I wont tell you
to not use
-
print $q->header("text/html");
-
But I would HI
$self->{_Email} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $self->{_Email} !~
/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/
should be
$self->{_Email} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $self->{_Email} !~
/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
Regards,
Jim,
My recommendation is to write a session file on your server and pass the session
id around with
the browser variables. Now whether you use cookies, get or post to pass the session
id, you don't
have to be passing the actual username. If you don't want to have the user see the
session
Webster,
Looks like your content-type is not being printed soon enough. You should
consider placing it
at the very top of your script unless you expect print some other kind of header (like
a Location).
print "Content-Type: text/html\n\n";
Regards,
David
- Original Message -
From
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
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,
Da
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/h
Alex,
Did you get the problem fixed? Yes it was because you did not escape your . when
you wanted a .
instead of an any character.
..[a-zA-Z]{2,3} will match ".abc", but it will also match "abcd" but \.[a-zA-Z]{2,3}
will require
that the first character this part of the regular expression
Teddy,
$|=1; is supposed to perl to print to standard out right away instead of buffer
information.
You see, by default Perl buffers what it is going to print out until the buffer is
full, then
prints.
For some reason, when I use $|=1; It seems that the first output to STDOUT is
buffere
Konrad,
Is this what your looking for?
--
my $input = 'ABCDEFGHI';
my $output = $input;
$output =~ s/(\w{3})/\$1\<\/p\>/g;
print qq^\$input = "$input"\n^;
print qq^\$output = "$output"\n^;
--
To mak
Kerr,
Apache spawns a child for each web connection, while doing this, if a cgi script
is called, it
pulls a copy of the script into memory, executes it.
Ways to debug: Yes Apache does have an error log, search your httpd.conf for
"ErrorLog". That
like specifies where Apache will write
Yes, your right.
It seems to me there has got to be a more efficient way to accomplish what is
being attempted.
Right now, the solution is making a copy of the file, then checking every line of the
original
against every line of the copy. This method becomes exponentially more processor
> Probably your web server is timing out the request and killing your
> script. Web servers don't like to run long-running processes like
> this. Perhaps you can fork off a child and have the child take care
> of it.
Another solution is to have something like the following in your loop:
-
Teddy,
Because times is a perl function, not necessarily a var. Here's what one of my
perl books has
to say about it:
---
The times function returns the amount of job time consumed by this program and any
child processes
of this program.
Shane,
Um, first of all, you probably shouldn't be modifying your cgi script dynamically,
Lots of room
for error. What you should be doing instead is perhaps updating a text file that the
cgi script
will open and use as its "Insert content here" content.
Next, how is the template.cgi be
Sorry, one more oops
$form_vars{$name} = [($form_vars{$name})] if (ref($form_vars{$name} ne "ARRAY"));
should be
$form_vars{$name} = [($form_vars{$name})] if (ref($form_vars{$name}) ne "ARRAY");
Sorry about these, there were a few recommendations I've received, and I had not
implemented them
Oops, let me make one small revision to my code:
if (exists($form_vars{$name})) { # if this is the first of this form input name.
should be
if (!exists($form_vars{$name})) { # if this is the first of this form input name.
Sorry about that all.
Regards,
David
- Original Message -
Fro
Connie,
> ; has no problem, why you would like to escape( \ )it ?
I know that = and ; don't have a problem, I escape them because I escape every special
character,
that way I don't have to worry about what I do and don't need to escape. I know, bad
habit (old
habits die hard).
> Besides, if y
Connie,
Something like the following is probably what you are looking for. Of course what
you should be
doing is using CGI.pm or some other tested form of input retrieval.
my @variables = split(/[\&\;]/, $input);
fo
When you have everything working, and something for security (htaccess), try
redirecting by, NOT
printing a content-type (text/html or whatever), then print this:
print "Location: http://www.domain.com/path/morepath/file.html\n\n";;
The capitalization and space are very important.
Regard
Curtis,
Thank you for your observations and compliments (first paragraph). No your right,
I haven't
been using taint (*I hang my head in shame*).
I probably would have done a few things slightly differently if I had a perfect
vision I was I
was creating when I began it. You see on the
Duh, I should have thought of that one.
So the only time this would be an issue is if somebody not knowing that ; can be a
element delimiter
creates an href with a ; in the name or value. Ok, that solution works for me.
Thanks,
David
- Original Message -
From: "Ovid" <[EMAIL PROTECTE
Of course, and usually that's the way I do it. Basically, if you put the local
statement in a
block, then the scope of the change to the system variable is only effective inside of
the block.
Just like if you did this:
--
{
my $cool = "stuff";
print q
I did not say that you said this. I did say that was the tone (or feeling created
based on what
was said). I knew you had mentioned the ; vs & thing before. But at that time, I
still did not
have a solutions to replace it with.
I understand the frustration of telling somebody somethin
<[EMAIL PROTECTED]>
Sent: Wednesday, July 03, 2002 11:46 AM
Subject: Re: Form.pm
perl-dvd wrote at Wed, 03 Jul 2002 19:22:49 +0200:
>
> Yes, my lines of code are long. For this I apologize. I work on 1600x1200 with
>Homesite
> which
> doesn't
Niko,
As I said in the bottom of that email, that is one of the optional features I will
provide in
the future, to allow acceptance of get along with post.
David
- Original Message -
From: "Niko Gunadi" <[EMAIL PROTECTED]>
To: "Beginners cgi" <[EMAIL PROTECTED]>
Sent: Wednesday, Ju
Curtis,
Of course I'm not going to take this personally, this is the very reason I
submitted the code.
I appreciate your feedback. The reason I was frustrated with Todd is because it was
strictly
criticism. Basically the tone was "Your wrong, and you shouldn't be making your own
lib anywa
The reason I explained how to slurp the file into a variable was so that it could be
printed anytime
anywhere. My solution does not force the file contents to be printed right away.
This is also
useful for if you wish to replace something in the faq before printing it, or adding
some to the t
Curtis,
Thank you for the compliment. Please do inform me of what should be modified.
Thanks,
David
- Original Message -
From: "Ovid" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 02, 2002 6:18 PM
Subject: Re: Form.pm
--- Todd Wade <[EMAIL
Todd,
Oh you mean like this:
my(@pairs) = split('&',$tosplit);
my($param,$value);
foreach (@pairs) {
($param,$value) = split('=',$_,2);
$param = unescape($param);
$value = unescape($value);
$self->add_parameter($param
Teddy,
Well, this works, I've tested it,
---
my $test = qq^
Index
About
^;
$test =~ s/href\=\"(.*?)\"/href\=\"another_text_$1\"/g;
print $test;
-
The reason the other even with an /s did not work was because
You of course have to pay for the full registration, but you can download the demo and
try it out
from here:
http://labf.com/download/winaxe.html
Regards.
David
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Martin Pestun" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday
Well, I'm a little bit behind
schedule because the home page for Form.pm just got erased (long story).
Anyway, I just setup a backup system on my server now so I'll have a weeks worth
of daily backup's (ya, I know I should have had this before). But attached
are the main functions of F
Curtis,
Thanks for the reminder, I'll get it up shortly after I get home from work. About
5:00pm
Mountain Time.
David
- Original Message -
From: "Ovid" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 01, 2002 11:39 AM
Subject: Re: CGI.pm v/s roll
open(FH, " for write, >> for append
local $/ = undef; # slurp mode (allow for shoving the whole file into a scalar)
my $faq = ; # slurp the whole file into this scalar.
close(FH);
- Original Message -
From: "Kyle Babich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 3
my $stuff = qq^
here is some stuff
and more stuff to boot
stuff for me
and stuff for you
^;
$stuff =~ s/stuff/money/gs;
# g says match all occurrences
# s says treat $stuff as a single line
Regards,
David
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL P
Look up the wget package for Linux.
or you can try the combination of these:
HTTP::Request;
LWP::UserAgent;
Regards,
David
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 28, 2002 6:25 AM
Subject: Printing the Content-typ
Teddy,
Try:
if (-e "/usr/www/domain/file.txt"){
print "file.txt exists\n";
}
A few others are -f to check if it is an ordinary file, -d to find if it exists and is
a
directory, -l to find if it exists and is a symlink, -T to find if it exists and is a
plain text
file. There are about 2
No offence taken, I have heard the word hubris before, but I wasn't certain of the
meaning, so
naturally I looked it up (now that you mention it, I have heard that quote out of the
Camel book
before). At first I thought it was a compliment the way you said it and all, but
after seeing
dictiona
That actually has nothing to do with it. It has everything to do with the strong
desire to improve
circumstances, be innovative, make the world a better place. If you want to call me
arrogant for
trying to improve my surroundings, go right ahead, but your tacking the wrong name on
me.
David
by the way, :) is a smiley, it means I'm joking with you. (reference the last email)
With mine, there is nothing beyond what I described. The hash structure I gave you
below, that's
it. Form.pm takes the input, makes a hash with it, and if you understand how to use a
hash and
array ref, your
my point stands :)
So out of curiosity, what kind of data structure do you get back with this? If its as
I would
imagine, then its very close to my own.
%hash = (
'a_name' => 'value', # for single name value pairs
'b_name' => ["multiple", "values", "for", "this"], # for single name
You make a very good point fliptop, I did forget the nature of this mailing list. As
far as CGI.pm
debating, I will step down in this mailing list.
David
- Original Message -
From: "fliptop" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Bob Showalter" <[EMAIL PROTECTED]>; <[EMAIL
The difference is, the efficiency and data structure CGI.pm returns. Mine came to
I think 72
times faster when not uploading images, and 2.5 times faster when uploading images.
I'm not saying
CGI.pm is written poorly or anything, I am saying that it is a little bit bloated and
has a lot o
--
my $var = "(801) 555-"; # ya, ok so I'm in utah :)
$var =~ /(\(\d+\))/;
# real paren, escape paren, \d = digits,
# + = one or more, escape paren, real paren
my $area_code = $1; # set to what came from between the real parens
Bob,
That's interesting.
You know, I work with about 5 other perl programmers, most of which do use CGI.pm,
but none of
them use it for anything other that gathering input from the web. I have also
downloaded many
packages from CPAN, I would say a majority of them use CGI.pm, but very r
Ok, so here's the deal:
"Some HTTP/1.0 software has interpreted a Content-Type header without charset
parameter incorrectly
to mean "recipient should guess." Senders wishing to defeat this behavior MAY include
a charset
parameter even when the charset is ISO-8859-1 and SHOULD do so when it is k
Bob,
> CGI.pm--a threat to our way of life! Down with the troglodytes! :)
Well, not exactly my point, but ok :) Just kidding
I just think there are too many who close their minds to anything but CGI.pm,
including potentially
more efficient customized solutions.
David
- Original Message
Bob,
> I fail to see how writing code with errors is somehow CGI.pm's fault
No its not. But I'll tell you one thing, people who depend so heavily on CGI.pm
generally have a
good understanding of how to use CGI.pm, but have less understanding of what is really
going on. Me
personally, I want t
Kyle,
Well, I'd start by printing an actual content type instead of depending on CGI.pm
for that:
---
print "content-type: text/html\n\n";
---
Second, I would condense your if to this
-
By all means, Homesite.
Ok, so it actually cost a few dollars, but this thing does great things for you.
- It color codes html, perl, sql, css and so on.
- save your files as windows, unix or mac format.
- upon opening files, auto discover which format and display correctly
- open multiple fil
Martin,
Well, you can use a simple html tag called pre.
---
open(FILE, ";
close(FILE);
print qq^
$contents_of_file
^;
---
Is that what you are looking for or do you want to actually split up the data into
i
Octavian,
Secondly, by your explanation, I'm not sure whether you know this, but your if
should be like
this:
--
my $test = sub_name();
if ($test){
# stuff
}
--
Or
--
if (sub_name()){
# stuff
}
---
Erik,
Try not printing
print "Content-type: text/html\n\n";
then print
print "Location: /path/prog1.cgi\n\n";
regards,
David
- Original Message -
From: "Erik Riggenbach" <[EMAIL PROTECTED]>
To: "Beginners-Cgi" <[EMAIL PROTECTED]>
Sent: Saturday, June 22, 2002 6:59 PM
Subject:
Curtis,
Is this why you want my CGI.pm input replacement lib? So you can turn around and
tell me why
CGI.pm is so much superior? As I read through the tutorial here, with every thing
said, the basic
message seemed to be "It doesn't matter who you are or how smart you think you are,
your n
No, this is quite a simple problem actually. Here's how.
my $alias = "home|htmlBody,Header,homebody,footer";
my ($name, $subs) = split(/\|/, $alias);
my @subs = split(/\,/, $subs);
foreach $sub(@subs){
my $return_val = &{$sub}($pass_in_vars);
}
So the first part I assume you've got whe
The template replacement I cant give because I wasn't the one who wrote it, but
Form.pm is my
CGI.pm replacement for receiving data. I wrote it approximately 2 1/2 years ago and
have been
tweaking and improving it since.
I'll release it to C-PAN within the next month I think, look for i
You know, I'm a not a Microsoft fan by any means (if you ask people who know me,
you would
probably get more rash descriptions of how I feel about them). When it comes to using
an os as a
client, Windows 2000 is pretty nice. But when it comes to running a server, I will
avoid windows at
a
60 matches
Mail list logo