At 04:48 PM 2/25/02 -0800, David Gerler wrote:
>Peter,
>         Thanks for that implementation. That helps with that part. I am 
> still not
>clear on how to get the URL into the variable to begin with. When I login
>manually, it sends me to a page that looks like this (
>http://www.thissite.com/Welcome.asp?4A9BDA7AD78140 )
>
>The part I want to pull out and reuse is after the (?) or 4A9BDA7AD78140 .
>However, I don't get how to move the
>http://www.thissite.com/Welcome.asp?4A9BDA7AD78140 to a variable to parse.
>
>In case you didn't notice, I am quite new to perl. I have modified a few
>scripts and created only one before this one.

Well, you have to walk before you can run.  Perl doesn't lend itself too 
well to the "change something that you don't understand in the first 
place"  model of development.

You're trying to develop a script to masquerade as a browser and take 
actions as though there were a user behind it.  This is in the "run" 
category, not "walk".  I could tell you that you'll need to use 
LWP::UserAgent, form requests using HTTP::Request::Common, and save cookies 
into a jar associated with the user agent, but this is likely to be all 
greek to begin with.

Check out the lwpcook documentation page.  Until it makes sense, learn the 
more elementary stages.  Some things don't have shortcuts, sorry.

>once again, I appreciate your help.
>
>Dave Gerler
>
>
>-----Original Message-----
>From: Peter Scott [mailto:[EMAIL PROTECTED]]
>Sent: Monday, February 25, 2002 9:15 AM
>To: David Gerler; [EMAIL PROTECTED]
>Subject: Re: need terminology help
>
>
>At 11:18 PM 2/24/02 -0800, David Gerler wrote:
> >I can't figure out the terminology for what I want to do. I have searched
>my
> >resources for what I think it is with no luck.
> >
> >Here's what I want.
> >
> >I want the script to login to a web site. The website will redirect to
> >another site with a session id in the url. I need to parse the session id
> >out of the url so I can use it in future communications. I have tried
> >searching for "parse Url" and a manual search for terms that I think might
> >apply. Any help or leads anyone can provide will be appreciated.
>
>Well, you got the terminology right, so I'll press on to implementation.
>
>Use the query_form method from the URI module to get the value you want:
>
>use URI;
>$u = URI->new("http://foo.com/bar.cgi?baz=blech&bibble=bubble";);
>%query = $u->query_form;
>print $query{bibble}'
>
>prints "bubble"
>
>--
>Peter Scott
>Pacific Systems Design Technologies
>http://www.perldebugged.com
>
>
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com


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

Reply via email to