Getting a URL form a "logged in" site
see3d at writeme.com
Wed Dec 21 19:36:05 EST 2005
Well, I am getting discouraged with this. I have done everything
suggested on this thread. I am following the redirects, capturing
all the cookies in a cookie array, and setting the httpHeaders with
them, but I still can't complete a login successfully. I guess this
can get complicated, and it is hard for me to determine what the
server is looking for vs what it is getting. I did not set out to
create a general purpose http transaction engine, but that is what it
feels like I am headed for! Not really sure I can succeed at this by
Christmas at this rate!
With my very limited knowledge of internet protocols (but I learned 5
times as much as I knew before starting this thread, thanks to this
list) I might just have to try the altBrowser solution. I gave the
demo a try, but it crashed just at the point of downloading the data
--It did not say that it was compatible with my OS X 10.4 system
without going for the real license and the latest version though. It
is an expensive solution for personal use --costs as much as my DC
and more than Constellation, but I have spent several days on this
and I need a solution soon.
I don't want to keep bugging this list forever about this. You all
have been so generous with you advice already, and I thank you!
On Dec 20, 2005, at 9:38 PM, Brian Yennie wrote:
> Dave & Dennis,
> Those headers you report are a redirect which probably needs to be
> What happens if you follow the URL indicated in the "Location"
> field? That URL seems to indicate from it's name that is has
> something to do with setting cookies.
>> I am trying to find the cookies... In response to my login,
>> libUrlLastRHHeaders() returns this:
>> HTTP/1.1 302 Moved Temporarily
>> Server: Zeus/3.4
>> Date: Wed, 21 Dec 2005 00:59:02 GMT
>> Connection: close
>> P3p: CP="CAO DSP COR CURa ADMa DEVa CONo PSAa OUR IND DEM PRE PUR
>> TAIa NAV UNI"
>> Expires: = -1
>> Window-Target: _self
>> Pragma: no-cache
>> Cache-Control: no-cache, no-store, max-age=0, s-maxage=0, must-
>> ########## I am not seeing any set-cookie in there.
>> It kind of looks like it does not like my login request for some
>> These are the cookies captured by the browser after the login:
>> #########After I make the data request, a bunch more cookies show
>> up in the browser:
>> ############# Cookies seem to be flying all over the place, but I
>> just can't seem to find when/how to capture them. I must be
>> missing something very fundamental. :-(
>> On Dec 20, 2005, at 2:48 AM, Dave Cragg wrote:
>>> On 19 Dec 2005, at 20:30, Björnke von Gierke wrote:
>>>> I am not sure but it seems you want to set a cookie?
>>>> In that case read the cookie page from netscape:
>>>> what you need to do in rev is to get the libURLLastHTTPHeaders()
>>>> it should contain a line similar to this:
>>> This should be libUrlLastRHHeaders(). This returns the headers
>>> received from the remote host's response. (libUrlLastHttpHeaders
>>> () returns the last headers used by libUrl in a request.)
>>>> Set-Cookie: NameOfCookie=Value; path=/; expires=Wednesday, 09-
>>>> Nov-2006 23:12:40 GMT
>>>> You need to set the httpHeaders to this line in response to keep
>>>> logged in, showing that you have kept the cookie:
>>>> Cookie: NameOfCookie=Value
>>>> Beware: There are ways to have several cookies in the same
>>>> request! So you need to accommodate for that. Also if you get a
>>>> Set-Cookie header with a date before the current date, you
>>>> should delete the cookie.
>>>> To pretend to be someone else, you need to to set the "User-
>>>> Agent:" header to something else using libURLSetCustomHTTPHeaders.
>>> You should just set the httpHeaders for this as well.
>>> (libURLSetCustomHTTPHeaders is for setting a complete set of
>>> headers including the request line, and is probably only useful
>>> for things such as HEAD or OPTIONS requests.)
>>> To add multiple headers to the httpHeaders, you can do something
>>> like this:
>>> put "Cookie: NameOFCookie=Value" into tMyHeaders
>>> put return & "User-Agent: specialAgentString" after tMyHeaders
>>> set the httpHeaders to tMyHeaders
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode