Getting data from a secure web page

Sarah Reichelt sarah.reichelt at gmail.com
Wed Feb 3 05:54:52 EST 2010


On Wed, Feb 3, 2010 at 8:40 PM, Dave Cragg <dave.cragg at lacscentre.co.uk> wrote:
> Sarah
>
> Not quite sure what you're wanting to do. Do you just want to get the html page normally returned after login from within a Rev script?

Yes. That way I can get the data automatically, without having to log
in manually with my browser.

>
> If so, does this work?
>
> on mouseUp
>  libUrlSetSSLVerification false ## SEE BELOW 1
>   put "https://memberservices.optuszoo.com.au/login/" into tUrl
>   put "Action=login&username=abc&password=abc" into tPostData ##SEE BELOW 2
>
>   post tPostData to url tUrl
>   put it into field 1
>   if the result <> empty then
>      answer the result
>   end if
> end mouseUp
>
> Point 1
> libUrlSetSSLVerification false does as Bernard says, and no check is made of the certificate. (But data is still sent encrypted) Better to set the sslCertificates to a suitable file if you have one.
>
> Point 2
> Change the "abc" for username and password to the correct values. (URLEncode if they contain funny characters or spaces)
>
> When I tried it, it returned the login page again but with the "Incorrect username/password." text included, which suggests it might be doing something right.


If I try with the wrong login details, I get that "Incorrect
username/password." page, but if I use my real login details, I get no
page, but the result is "error 302 Moved Temporarily".

Bernard: Trying the web address with the username & password included
in my browser doesn't work either - I just get the login page again,
so I guess that means it isn't just basic auth.

So I will try it on Firefox and see if I can get the custom headers as
Jim suggested.

I usually do this on my work computer, so I will check tomorrow to see
if I have a certificate there.

Thanks all,
Sarah



More information about the use-livecode mailing list