print "http://site/page/script.pl?me=I\&you=U>Click Me";
or
print "Click Me";
or
print "http://site/page/script.pl?me=I\&you=U\";>Click Me";
or
print 'http://site/page/script.pl?me=I&you=U";>Click Me';
but beware what you want is /cgi-bin/ or cgi-bin/ .The first one is
lookup the CGI root from
[.]
>
> #!/usr/local/bin/perl -w
> use strict;
>
> open IMAGE, 'test.jpg' or die "Failed to open image $!";
> my $buf_chunk_size = 1024 * 16;
> my $buffer;
> binmode IMAGE;
> binmode STDOUT;
>
> print "Content-Type: image/jpeg\n\n";
> print $buffer while read IMAGE, $buffer, $buf_chunk_siz
>
> we all know already, what it looks like, when we have a form like
> this:
>
>
>
>
>
>
>
> will be this as a link:
> http://bla.net/cgi-bin/blabla.cgi?AREA=1&EXT=bla
For upload file, you need to make the method by POST,
AND, you have to add enctyp
No... I believe. I've digging on this topic for very very long
time on my Win32, Sambar and Apache server.
I can't print any image out without \r\n\r\n, where \n\n is for
text file only. Why? I don't know =) Guess, because \r\n is for
*binmoded data*.
And without binmode STDOUT and IMAGE both.
Emm... I think this mail would better go to CGI list ...
[...]
>
>
> #! /usr/local/bin/perl
>
> print "Content-type: text/html\n\n";
>
> if ($ENV{'HTTP_USER_AGENT'} =~ /Mozilla 4/
> and not $ENV{'HTTP_USER_AGENT'} =~ /compatible/i ) {
> print ;
> } else {
> print ;
> }
>
>
How a
> C++ program's output looks like this:
>
> A= 20
> B= 30
> C= 70
> AVG= 40
> MIN= 30
> MAX= 70
> TIME= 0.0037
>
> If I call this in Perl:
>
> #!/usr/bin/perl -w
> my $result = `myapp`;
replace as :
my @results = `myapp`;
> exit;
>
> there is output myapp saved in $result
>
> How to move va
or can try
push @INC, 'the/path/you/want';
Rgds,
Connie
- Original Message -
From: "root" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 20, 2002 2:19 AM
Subject: Re: Can't locate loadable object DBD::mysql in @INC
> to force @INC to look at the directory of your
[...]
>
> print "Content-type: text/plain\n\n";
[...]
Try
print "Content-type: text/html\n\n"
instead of "text/plain\n\n";
Rgds,
Connie
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Yes, much clear, and you've simplifies your question welly =)
You may want to look at http://search.cpan.org/search?mode=all&query=FTP
As long as FTP has its own fix protocal, that wouldn't be
very difficult to deal with for file transfering(with Perl).
The only thing I can think about this momen
>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 1:04 PM
Subject: RE: Online installer
Hi,
The programs are located on a website, and I want to offer this as a remote service,
where anyone can basically use to
install it on their server. They might or might not be on the same server
> Hello everyone,
> Can anyone tell me how to create an online cgi installer?
> Details:
> I have a program that want to install on my user's website upon their
> request.
Where are those 'website' located ? Do you mean you
need a configurator at your local(server) side ?
> What I am looking f
Thanks everybody, I've made it =))
package Die4CGI;
use strict;
$main::SIG{__DIE__} = \&Die4CGI::die;
sub die
{ my $dieMesg = shift; $dieMesg =~ s/ at .+$//;
my ($package, $file, $line) = caller;
$file =~ s/^C:\\Server\\Staff\\Connie\\Project\\onTry\\/\\/;
$file =~ s/\\/\//g;
print "Co
[...]
> If you really want to munge the message, you could subclass CGI::Carp and
> install your munger in front of the call to CGI::Carp::die in the
> $SIG{__DIE__} handler.
>
But what is a 'munger' ? and what about $SIG{__DIE__}?
How to play with ? Is there any reference documents I
can read
I am on a Win32 system, and I use the fatalsToBrowser to prompt errors
with some scripts. However, the error mesg will also prompt where exactly
the file(script) is located. In case, I don't want the full path is exposed.
Can I modify sth , perhaps regex s///, to mask the root path ?
like :
Fil
> Code 1: It didnt work...
>
> #!/usr/bin/perl
>
> use CGI;
> $query = new CGI;
> my $filepath='/home/myaccount/uploads/laptop.jpg';
>
> print $query->header('image/jpeg');
> print $filepath;
>
Of cause, you didn't open the file and read the file.
You are trying to print "/home/myaccount/upl
Don't have exact idea, but see inline comments :
>
> #! /usr/bin/perl -w
Try #!/usr ... you've added a space there.
use CGI::Carp qw(fatalsToBrowser); # try add this line
[...]
>
> should I get to see the %ENV details of server_a?
Not, but you might check your error.log so you'll get
a bette
2 approachs, both js =)
1. get time with js, write a cookie, and read the cookie.
2. get time with js, use a GET method to take it back.
Rgds,
Connie
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 11, 2002 10:29 PM
Subject
my @tm = gmtime(time + $offset_hrs * 3600); # or - hrs
Rgds,
Connie
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 11, 2002 10:27 PM
Subject: How to use the gmtime() function?
> Hi all,
>
> I am GMT + 2 hours (Eastern U
Thanks a lot, Chris and Teddy,
Without yours mension, I will believe
"Content-Disposition: attachment; filename=$filename"
is just for "Input", where I think the header options
is only be :
"Content-type: typeof/sth\r\n\r\n"
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
use Business::CreditCard can do something, but I think you better
not to take that risk on your own. look for some e-commerce partner
is a better choice though. =)
Rgds,
Connie
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August
Try
print "Content-type: text/html\n";
print "Location: theparamyoudefine/script.pl?paramyouwant\n\n";
Rgds,
Connie
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 12, 2002 11:51 PM
Subject: A function for running another
I have a script that read and then print a binary file on runtime,
which actually mean to a file is for download.
I mean, not like this : Download.
However, I don't know how to give a name for the file.
I've use this header : print "Content-type: audio/mp3\r\n\r\n";
and my script 's name is d
$HEX = sprintf "%1x", $DEC;
for more, perldoc -f sprintf
Rgds,
Connie
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 09, 2002 3:11 AM
Subject: How to convert decimal to hex?
> Hi all,
>
> Please tell me how to convert a
>
> while () {
> my @rows= split (/;/);
> for my $i (0 ..$#rows)
>{
>print $q->a({href=> "/cgi-bin/details.cgi?nr=$i"},
>escapeHTML($rows[0]))."\n";
>}
>close ADDRESSLIST;
You have closed the file handle here, but the
use strict
use warnings
Will help you to save most of debug time.
And. perhaps you still have option C.
Thaz, if you need some quick test, you can
make the form data becomes uri escaped. or
boundary based. So you can test it inline.
with warn, and die. you will really what
error is happened at
1. Can remote user hide their REMOTE_ADDR and HTTP_REFERER?
2. What types of REQEUST_METHOD will CGI / CGI.pm handles ? I
think just get and post.
3. How many enctypes here ? What I know is 2. Is that refer to CGI/1.1
or HTTP/1.1 or the browser?
4. When I pick up a form, would the line breaks
I didn't read the rest of your code, but I found a very visible
error You say your perl(perhaps you mean the comipler)
is installed at C:/progra~1/perl/... but your code write it as :
#!E:/Perl/bin/perl -wT
So I guess everything will going wrong
Rgds,
Connie
- Original Messag
Sorry, wrong =)
One
Two
Three
Don't missed the value= inside option.
where value= is the value throw to CGI,
otherwise, you will get type=(nothing).
Rgds,
Connie
- Original Message -
From: "Margaret" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 01, 2002 1:45 P
> > What is the best way to validate form data.
That would be a very very big topic here...
I can't show the method, but can share some steps.
Client Side
1. Check missing fields (Check it if js enabled)
2. Check pattern (js also do regex, but not powerful as Perl)
Server Side =
Use cookies is the best choice.
or use frame to hide any URIs as alt.
Rgds,
Connie
- Original Message -
From: "Jim Lundeen" <[EMAIL PROTECTED]>
To: "begin begin" <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 8:06 AM
Subject: Post to a second CGI script
> Hello All,
>
> I have 2 sc
> I've seen why it is a good idea to deny uploading files on the server if
> this is not necessary using CGI.pm.
>
> Well, what happends if someone tries to upload a file on the server with a
> fake form, if I am not using CGI.pm in that script?
If the true form is within your site, then, you ca
- Original Message -
From: "Hytham Shehab" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 25, 2002 4:21 AM
Subject: Re: Finding the country
> Randal L. Schwartz wrote:
> > If you're using it to force the language of the page, no. Use the
> > browser specification ins
>- Original Message -
>From: "alpha" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, July 25, 2002 6:30 AM
>Subject: another way to show results ?
>
>hi all
>i am new in perl and want to know can a perl cgi , return results in other way ?
It depends on how you activate
> 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 \".\""
- Original Message -
From: "Michal Simovic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 11:54 PM
Subject: my mailbox is filling with all posted messages, what to do?
> I'm sorry for bugging you but I don't understand (I'm
> not a native english speaker)
S
Hmm... if I don't remember it wrongly, cgi-lib.pl is some sort
of old Perl(4) code. Now, you better use CGI.
Rgds,
Connie
- Original Message -
From: "Michal Simovic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 4:28 PM
Subject: question about cgi-lib.pl
> I
So what kinds / types of declarations you want to make ?
Rgds,
Connie
- Original Message -
From: "Murli Nair" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 19, 2002 3:58 AM
Subject: Script for making declarations
> Hi !!
> Is anyone aware of a script that I could use
First, you can use cookies, temp files.
> with multiple
> scripts and html forms and hidden fields.
Do you mean that's a CGI script ? or Javascript ?
> However, I would like to try to
> use one script with subroutines. I guess my main stumbling block is
passing
> hidden form fields betwe
> I'm trying to get the "put" function from Netscape, to work with Apache.
What is the "put function" ?
> I have a windows OS (NT server), and I'm using the windows version of perl
> as a cgi script interpreter. The problem is, the put script won't work
> with perl.
Have you correctly set the
> I thought Windows doesn't support Perl's flock, but I heard that it does.
> Is it true?
Yes, flock can use in Win32 OS.
>
> I've seen more Perl programs that create another temporary file for
marking
> a file as locked than programs that use the flock function.
>
Imagine, there is a text base
# values for the same name.
> }
> --
--
>
> Regards,
> David
>
>
>
> - Original Message -
> From: "Connie Chan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <
Hi all,
With get method from form, we always see that the
$ENV{QUERY_STRING} like this :
&message=%20%2F%15+...&...
btw, what is the name of that string in types of ? Escape ? Unicode ?
With simple tr/// and s///, I can get back what exact the input
is, but, how can I make a the input bac
Sorry, I am poor in English, but is this what you want ?
$title = $content;
while ()
{ chomp;
$title = $1 if ( /(.+)<\/title>/i );
} print $title;
Rgds,
Connie
- Original Message -
From: "John Pitchko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002
Maybe yes, maybe no.
You may try to use LWP to grab the page's content, and digest it by your
coding effort.
However, you may have to face the cookies gard, and password gard(like
cNet).
Good luck if you really want to have a try.
If I do not make a wrong memory recall, SOAP is a module can link
> Sure, I've got my own Apache-server.
Then I wonder why you going to Upload it, but not save your file
directly inside the bin ? Are you running them with different OS ?
> print "Content-type:text/html\n\n";
Yes, like Janek said, you may try to make it
print "Content-type: text/html\n\n";
(wi
So what's your error message you got ? and where you got
the error? And what is the "boxes" mean ? I dont' see any
boxes there. so what is your text editor for writing this script ?
But the most important things are :
1. Do you have the right to run CGI at your server ?
2. Do you know if you are p
$input =~ s/^(.+)$/"$1"/;
Don't use it. This is too trouble to doing this way.
Just want to tell, this is also a method =)
Rgds,
Connie
- Original Message -
From: "Henk van Ess" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 07, 2002 5:12 PM
Subject: How to add " "
First, I have to declare that below are my own opinion only.
Second, I would like to give you a pure HTML sample for a 2x2 table.
Col 1 Row 1
Col 2 Row
1
Col 1 Row
2
Col 2 Row
2
Third, I would say, CGI.pm can handle simple with quite fair
quality,
but it should not for a table. Code wi
Please anybody I am begging now. Please help...
This is a mess now... I even have no concept on how to start.
I will working on something like this
There are 2 interface as input. One is a Web interface, which will accept
HTML tag and plain text by POST method, but by GET
Well, I don't know how to pick a reference like this... but I guess
using a hash of array may also fulfill your job...
my @code = ('001', '002', '003', '004');
my @name = ('Joe', 'May', 'Bob', 'Foo');
my @birth= ('Jan', 'Feb', 'Mar', 'Apr');
my %Data = (Code=>\@code, Birth=>\@birth, Name=>\@name
Hi all,
This is a mess now... I even have no concept on how to start.
I will working on something like this
There are 2 interface as input. One is a Web interface, which will accept
HTML tag and plain text by POST method, but by GET method, the input
would be an URL. Another One is a ma
So what's your input ? and you's your supposed output ?
regards,
Connie in sick >_<
- Original Message -
From: "Paul Arsenault" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 04, 2002 7:48 AM
Subject: Concatenating names from form
> I want to be able to read in name
uot;,"pennywise.jpg","power.gif","nightshade.swf","pckiller.swf");
>
> srand(time() ^ ($$ + ($$ << 15)));
> $plup = rand(@images);
>
> print "Content-type: text/html\n\n";
> if ($plup =~ m/(^\w\.gif\|^\w\.jpg)/ {
> print &q
So... I've viewed your code... the only problem is you used so may
""
In case, one is enough and all ( just for your case )
However, that's not the Perl stuff, but HTML prob.,
So I only explain it short =)
You can finish your whole script like this, actually the
framework should be looking
Any sample ? and Source Code ?
Smiley Connie =)
- Original Message -
From: "Maureen E Fischer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 03, 2002 12:24 AM
Subject: Perl CGI FORM statement
> Hello,
> My question is about CGI's form statement. I wrote a pro
Emm. I don't exactly know what do you want,
but try this if that's what you want:
make an array to put your IMG files,
make another array to put your SWF files.
make a random 0, 1 to choose if you want to output
as IMG or SWF
if IMG, random a file from the IMG array,
if SWF, random a file f
So where do you "print out the data" ?
In a console ( shell or dosprmpt ) ? or as a html page ?
If that's the first case, it should not be happened unless you do something
to elimate the \n operator If the second case, assum you should know,
HTML will not auto break line even in your souce is
How about LWP::UserAgent ?
Besides, did you make the in your index.html ?
( I don't know if this is nessary or not, but I always get the right
result with and the file.html as a full path)
And Umm Is the "Page cannot be found" Comes up by your
server ( Standard 404 ), or Explorer Error, or
Well... what's the rest of your .shtml file ?
did you put a ?
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 10:11 PM
Subject: text/plain versus text/html
> Hi all,
>
> Can you tell me what should I put in an SHT
Seems that you missed a line to capture the $ENV{QUERY_STRING};
such as : ($ignore, $body) = split (/=/, $ENV{QUERY_STRING});
when (! $body), your if and elsif statements will not be run.
- Original Message -
From: "Kyle Babich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday,
Hi everybody,
Is there any module can advise me to use for developing
image counter ?
Thank you very much,
Connie
x27;t those vars be removed if the script run once
only ?
Have a good day =)
Connie
- Original Message -
From: "John Brooking" <[EMAIL PROTECTED]>
To: "Connie Chan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 12:44 AM
Su
Now, I have a CGI script which using GET method to receive Query,
and my script looking like this :
# C:/PERL/BIN/PERL.EXE
# script name : QUERY.PL
require "my_external_scripts.pl";
$query = $ENV{QUERY_STRING};
$result = time."_".$ENV{REMOTE_ADDR}.$myPa
Hi all, would anybody know how to handle a form with
about 6000 around data field ? and if there any max size
for data submit through CGI ?
Anyway, I don't want to use cgi.pm.
Thank you for any hints and advise =)
Connie
Dear all,
I have this statement
if ( $ENV{REQUEST_METHOD} eq "GET")
{
...
...
}
That works fine if I don't use -w , but if I use -w,
it tells "Use of uninitialized value in string eq at."
why ? Is that related to declare it first such as :
my $req = $ENV{REQUEST_METHOD};
Thanks
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
You may try this as header :
print "Content-type: text/html\n\n";
- Original Message -
From: "Aman Raheja" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 02, 2002 1:13 AM
Subject: netscape problem !!!
> Hi all
> I have created a cgi-perl script for a web-site. I am us
Hmm. I guess it is not possible.
First, when a file want to upload, the input type should be FILE, not
HIDDEN, not TEXT.
Second, when input type is FILE, I found that this is unable to make preset
value.
Third, the sequency for the ftp is file uploaded first, give the name at
last.
Am I right
Is that PWS in terms of Personal Web Server by MS ? If I didn't remember
it wrongly,
you can't run perl script there, but ASP instead.
Anyway, if you try to run CGI, I would like to tell the CGI-BIN is just the
location
where your scripts are putting in ( Maybe a virtual directory, depends on
y
Dear All,
I have sort of questions, would you please give me some hint, even refering me to a
perldoc would be nice too.
1. When I open a text file with *lines, however, I just want to read the first line,
would this be a good idea ?
open (FILE, "textfile.txt"); $firstline = ; close (FILE);
w
now, I am writing a script which to let user modify the password of
their email account automatically, but our email server will encrypy
the password in some ways. so it makes me unable to cmp or write.
such as, if I give "A" as a new pass, it encrypted as QQ== in the user's profile.
if I gi
As no code here, so I only raise idea according to my experience =)
The possible output for a guest book are :
1. Thank you page
2. The same page as the guest book (but resulting on the process
of POST)
3. Redirect to the page same as the guest book(By GET method)
If case no. 1 , you may add ano
^M means you want to find a string that "start with M".
if you want to cut ^M as a space, maybe in this way;
s/\^M/ /g;
- Original Message -
From: "Brian N. Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 31, 2001 4:42 AM
Subject: A little off topic, but still d
Yet. I still don't know how to handle binary data with perl..
I just made a text file with Pascal... It sound read write are quite
easy.. but in perl... I have read some examples. it is require
for use binmode(MYFILE) ; then the read is require something
say as buffer size... What
Since we know this : $string =~ s/([a-fA-F0-9][a-fA-F0-9])/pack ("C",
hex($1))/eg;
is a statement which can converting back the "real string" from
a form field, but, could anybody tell how to convert the "real string"
to the "long long" string ??
Besides, anybody can tell what is the exactly me
76 matches
Mail list logo