Custom headers HTTP protected site
Jim Ault
jimaultwins at yahoo.com
Sun Oct 11 05:22:51 EDT 2009
This basicAuthString() tip definitely goes in my OnRev-CGI Info
folder
Of course everyone around the globe now knows my super-secret password
to the American baseball statistics site for fantasy play.
Now that it is the baseball off-season, who cares.
And by Springtime when the season starts, it will automatically change
anyway.
I'll be notified by email.
Good stuff.
Jim Ault
Las Vegas
On Oct 11, 2009, at 1:40 AM, Dave Cragg wrote:
> On 11 Oct 2009, at 04:49, Jim Ault wrote:
>> This worked for my case
>>
>> get "http://loginn:passwordd@www.baseballhq.com/"
>> get it & "members/tools/"
>> get it & "projections/proj.php"
>> put url it into allPitchersBlock
>>
>> put libURLLastHTTPHeaders() into headersToAnalyze
>> --one of the headers is Authorization: Basic
>> cm90b3Bhc3MyOjUzcHJpbmNlNDY=
>>
>> filter headersToAnalyze with "*Author*"
>> put headersToAnalyze into msg
>
> You can create the authorization string yourself assuming you know
> the name and password . The following should do it:
>
> set the httpHeaders to "Authorization: Basic " &
> basicAuthString("myName","myPassword")
>
> function basicAuthString pName, pPass
> return base64Encode(pName & ":" & pPass)
> end basicAuthString
>
> This is for the Basic authentication scheme only.
>
> Dave
More information about the use-livecode
mailing list