web search

2001-11-21 Thread baby lakshmi

Hello

I am new cgi

I have a web site for eg let us assume that www.goole.com site is there.
and i want to sent a querry to that text area thr my perl program and want 
to manipulate the results.
So can any one tell me how to interface my query to the site and how to get 
back the results for the manipulation.

Any help in this regard will definitely helpful.

Thank you
Regards
babylakshmi

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




FW: Cookie Help PLEASE!

2001-11-21 Thread Carl Franks

the two subroutines are actually doing the printing, so change the two lines
in the "#Do Player Login" section

from>>

print &LoadMyCookie;
print &GameStart_page;

to>>

&LoadMyCookie;
&GameStart_page;


(untested)

--
>From: "Andre` Niel Cameron" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Cookie Help PLEASE!
>Date: Sat, Nov 17, 2001, 6:57 pm
>

> Ok, I finaly joined a perl list as I have been banging hy head against the
> wall for 3 days trying to get this to work!  I would really appreciate any
> help:)  Heres is the problem:
>
> I have a script that after you "Login" it should give you a cookie and then
> load the game start page.  Well problem is it gives the cookie but then does
> not load the page!  I am using CGI.pm for this as cookie-lib did not work
> overly well.  Here is my code(Don't laugh)
>
> 
> 
> #Do Player Login
> 
> 
>
> if ($ENV{'QUERY_STRING'} eq "Login") {
>
>CGI::ReadParse(*form);
>$password= $form{'password'};
>$username= $form{'username'};
>
>$file= "data/$username.db";
>open (USR, $file)  || die(&Badpw_Page);
>@Read_Password=;
>close(USR);
>chop(@Read_Password);
>if($Read_Password[0] eq $password) {
>print &LoadMyCookie;
>print &GameStart_page;
>exit;
> } else {
>&Badpw_Page;
>exit;
>  }
> }
>
>
> 
> #
> #Load Cookie
> 
> #
> sub LoadMyCookie {
>$bbtdPlayerData = $TheCookie->cookie(-name=>'bbtdplayer', -value=>[thing,
> stuff, t$
>print $TheCookie->header(-cookie=>$bbtdPlayerData);
> exit;
> }
>
>
> 
> #Game Start Page
> 
> sub GameStart_page {
> print "Content-type: text/html\n\n";
> print < Normal frames HTML page here I just did not want to stick it all in:)
> EOT
> exit;
> }
>
>
> You can see it all at http://a.axxs.net username is andre and password is
> password
> Any more info needed email me:)
>
> Regards,
> Andre` C.
> Technical Support
> ԿԬ
> 
> -
> Visit our support manual at http://supportmanual.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: web search

2001-11-21 Thread fliptop

baby lakshmi wrote:
> 
> I have a web site for eg let us assume that www.goole.com site is there.
> and i want to sent a querry to that text area thr my perl program and want
> to manipulate the results.
> So can any one tell me how to interface my query to the site and how to get
> back the results for the manipulation.

http://search.cpan.org/search?dist=libwww-perl

lwp::simple is probably the module you want to use.

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




DataBase Connection and stuff

2001-11-21 Thread Lilian Alvarenga Caravela Godoy

Please, I really, really need some help.

I need to know how to connect to a Database (SQL Server, running under
Windows 2000) throught a Perl CGI(running under Linux). 

I want to select some registries and update another ones.
Is there anybody that knows if thats possible?

Thanks in advance.

Lilian.



Redirection

2001-11-21 Thread Lilian Alvarenga Caravela Godoy

Another question: how can I redirect a Perl script to another page?

For example: I submit a for to a page called "receive.pl". In "receive.pl" I
process the given information the way I want and then I send the user to a
place like http://www.internic.com 

Does anyone knows how can I do that?

Thanks in advance!!

Lilian.



Re: Redirection

2001-11-21 Thread Jan-Willem Haaring

Hi,

You can redirect the user to a page by simply using:

print "Location: http://www.internic.com\n\n";;

This should be the first line to print to your 'webpage'.
good luck!

- Jan-Willem


On Wed, 21 Nov 2001, Lilian Alvarenga Caravela Godoy wrote:

> Another question: how can I redirect a Perl script to another page?
>
> For example: I submit a for to a page called "receive.pl". In "receive.pl" I
> process the given information the way I want and then I send the user to a
> place like http://www.internic.com
>
> Does anyone knows how can I do that?
>
> Thanks in advance!!
>
> Lilian.
>


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




Call for Top 10 reasons your form is broken

2001-11-21 Thread George Marselis

Hey guys,
i'm trying to compile a top ten of why your forms break, i.e. you try to 
press a submit button but it doesn't work.
any ideas?

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




RE: Call for Top 10 reasons your form is broken

2001-11-21 Thread Stokes, John

Well, for me it's typically:

1) didn't upload in ASCII mode
2) syntax errors
3) forgot carriage return after "End_of" mass quote tag

-John M. Stokes
Computer Psychiatrist (Director of Information Technology)
Church Resource Ministries
[EMAIL PROTECTED]

Three Pillars: Humility, Communication, Balance

> --
> From: George Marselis
> Sent: Wednesday, November 21, 2001 11:30 AM
> To:   [EMAIL PROTECTED]
> Subject:  Call for Top 10 reasons your form is broken
> 
> Hey guys,
> i'm trying to compile a top ten of why your forms break, i.e. you try to 
> press a submit button but it doesn't work.
> any ideas?
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> 
> -- 
> 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: [OT] Call for Top 10 reasons your form is broken

2001-11-21 Thread Casey West

On Nov 21, 2001 at 02:30 -0500, George Marselis took the soap box and proclaimed:
: Hey guys,
: i'm trying to compile a top ten of why your forms break, i.e. you try to 
: press a submit button but it doesn't work.
: any ideas?

hmm...

  - I push the submit button and the page just refreshes.
  - I push the submit button and my file upload field doesn't upload
the file.
  - I push the submit button and I get an 'Internal Server Error'.
  - I push the submit button and the browser just sits there.

I would imagine you're doing this to build some sort of FAQ or
document?  :-)

  Casey West

-- 
"Airplanes are interesting toys but of no military value."
 -- Marechal Ferdinand Foch, Professor of Strategy, Ecole Superieure
de Guerre.

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




Re: Call for Top 10 reasons your form is broken

2001-11-21 Thread Lisa Nyman

Hi,

If you mean top reasons why a script produces an error?

1) The script is trying to do something that the http user can't do.
2) Your script is not executable.
3) The script directory is not a recognized script directory.
4) The script doesn't produce a valid HTTP header.
5) The script tries to output something before a header.

Lisa Wolfisch Nyman  <[EMAIL PROTECTED]>  IT Warrior Princess
"Life is too short to wear ugly underwear."
Get the facts at http://quickfacts.census.gov/

On Wed, 21 Nov 2001, George Marselis wrote:

> i'm trying to compile a top ten of why your forms break, i.e. you try to
> press a submit button but it doesn't work.
> any ideas?


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




Re: [OT] Call for Top 10 reasons your form is broken

2001-11-21 Thread George Marselis

>I would imagine you're doing this to build some sort of FAQ or
>document?  :-)
>
>   Casey West
   yes, i am. the CGI books/FAQs i've read, don't deal with bugs very in 
depth. they just mention the 500 internal error, chmod 700|755 

Accessing wintel volumes/directories/files via browser

2001-11-21 Thread Jim Owens

From: RE: Call for Top 10 reasons your form is broken
> 1) The script is trying to do something that the http user can't do.


This brings up some issues I have been trying to solve, which may or may not apply 
here.

Basically, I have a web accessed script that  (ideally) will go out and read in some 
files
from another machine, do some text processing and spit it out to the browser.

The one thing I am having problems with is really a permissions issue I guess.

When I run the script from the command line, it runs fine. but when I run it through 
the
browser, it cant open the files on the far end machine.

Both machines are wintel boxes with IIS on them.  Right now, I have a drive mapped on 
my
native box, to the directory on the far end machine.  As I said, this works fine in the
command line.

I guess my question is, what are my ways to get around this HTTP permissions (or lack
there of) problem?  Can I make the script run as a different user?  Would a module of 
some
sort be better suited for accessing the files (currently using system calls)

I can have the script reside on a unix box if that makes things easier. (actually 
ported
it over to wintel, thinking that would make things easier!)  The far end box (with the
text files) will always be a wintel box.

I realize this entails several things outside of perl, so I apologize for its lacking 
in
topicality.

Any help or direction would be greatly appreciated though!

Thanks!
JimO



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




Base 64 encryption Routines

2001-11-21 Thread Darryl Schnell

I'm currently working on a perl program that interacts with Windows
Active Directory and was wondering if anyone knew or has a subroutine
that will encrypt a password using base 64 encryption.



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




Re: Base 64 encryption Routines

2001-11-21 Thread Casey West

On Nov 21, 2001 at 04:29 -0500, Darryl Schnell took the soap box and proclaimed:
: I'm currently working on a perl program that interacts with Windows
: Active Directory and was wondering if anyone knew or has a subroutine
: that will encrypt a password using base 64 encryption.

Use the module Digest::MD5.  There is a function called md5_base64().

  use Digest::MD5 qw(md5_base64);
  my $encrypted = md5_base64( $password );

Read about it here:
  http://search.cpan.org/doc/MSERGEANT/AxKit-1.4/Digest-MD5-2.12/MD5.pm

  Casey West

-- 
Shooting yourself in the foot with HURD
You'll be able to shoot yourself in the foot Real Soon Now.

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




form question

2001-11-21 Thread Nate

ok so im building an online employee application
and i have split it up into a couple of different html
pages so that its not a huge scrolling document, so 
i was thinking of using like a 'Next ->' button to continue
filling out the application and having the action to the form
use a perl script that gets all the info and prints it to a temp file
or something, so that at the completion of the application all the
info from all the pages is in one place, and then all that info could be
sent to [EMAIL PROTECTED]

anyone who has done something like this before, with a different
method, or that has a better way to do it... anything, enlighten me :)

thanx a ton
nate
"365 slices of american cheese...mmm"
-homer simpson



XML Header

2001-11-21 Thread jason

Need a little help

I am using

#!/usr/bin/perl -w

use CGI qw/:cgi-lib/;

print PrintHeader();


This gives a result of 

Content-Type: text/html

I need it to be

Content-Type: text/xml

How do I do that.

Jason

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




Re: Call for Top 10 reasons your form is broken

2001-11-21 Thread _brian_d_foy

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] (George Marselis) wrote:

> i'm trying to compile a top ten of why your forms break, i.e. you try to 
> press a submit button but it doesn't work.
> any ideas?

i've already compiled most of them in the CGI Troubleshooting Guide
referenced in the CGI Meta FAQ.
-- 
brian d foy <[EMAIL PROTECTED]> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html

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




Re: [OT] Call for Top 10 reasons your form is broken

2001-11-21 Thread _brian_d_foy

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] (George Marselis) wrote:

> >I would imagine you're doing this to build some sort of FAQ or
> >document?  :-)
> >
> >   Casey West

>yes, i am. the CGI books/FAQs i've read, don't deal with bugs very in 
> depth. they just mention the 500 internal error, chmod 700|755 

requests through proxy

2001-11-21 Thread Jack Daly


I'm have some scripts I put on my isp's server that work fine when I
access from my home machine which has dialup access.  But at work I get a
"www server not found" error.  I'm guessing that this is because at work I
have to go through a proxy server though I could be wrong.  I imagine I
have to add some code to handle requests that happen to come from behind a
proxy, but I'm not quite sure what I need to be looking at.  From poking
around on the web it looks like I need LWP::UserAgent, though from reading
the documentation it seems that would let to put requests through a proxy
server, not receive requests from.  At this point I'm thoroughly confused
and could anyone give me a point in the right direction?

thanks in advance,

Jack Daly



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




Re: XML Header

2001-11-21 Thread Stephan Tinnemeyer

print "Content-type: text/xml\n\n";
-- 
Dipl.-Chem. Stephan Tinnemeyer
Lindenallee 20
24105 Kiel
Germany

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




Re: Getting past "Use of uninitialized value..."

2001-11-21 Thread Scott R. Godin

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Etienne Marcotte) wrote:

> I have:
> 
> my $q = new CGI;
> $q->import_names('IN');
> 
> my $ID = lib::auth_user($IN::UsrName,$IN::UsrPass);
> 
> sub auth_user returns a session ID kind of data.
> 
> $IN::UsrName and $IN::UsrPass are used only once and gives warnings.
> 
> Etienne
> 

I noticed that and used something like this to get around that.

# set up major input/output variables in such a way that it supresses 
# "used only once" warnings for the variables brought in via the 
# import_names() sub, but also keep some main-only vars separate from 
# the dupes to cut down on memory usage. 
BEGIN {
@main::globals = 
  qw($mapname $author $author_first $author_nick $author_last 
 $version $release_date $filename 
 $last_update $email $website_url $website_name $credits 
 $other_levels_by_author $gametype $bot_able $single_player 
 $teamplay $difficulty_settings $new_sounds $new_textures 
 $mutators $mods $construction_base $build_time $editors_used 
 $ext_description $known_bugs $mod_type $mod_description 
 $authors_notes $game $weapons $power_ups $new_music 
 $num_playerstarts
);
}
# this takes advantage of the fact that use vars is looking for 
# list context
use vars @main::globals, 
 qw($internal_comment1 $style $namefill $output_path $htmlout 
$textout @htmldata @textdata $current_date);

# the namespace used will be ' import_names("UT"); ' later in the script
package UT; # slip into the package

   # and slide in our 'globals' that get imported to that namespace
   use vars @main::globals; 

package main; # then slide back out to main again. 

a semi-slick workaround for a semi-ugly problem. supresses all those 
'used only once' warnings quite nicely though.

-- 
Scott R. Godin| e-mail : [EMAIL PROTECTED]
Laughing Dragon Services  |web : http://www.webdragon.net/
It is not necessary to cc: me via e-mail unless you mean to speak off-group.
I read these via nntp.perl.org, so as to get the stuff OUT of my mailbox. :-)

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