• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cookies & URL Access Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cookies & URL Access Scripting


  • Subject: Re: Cookies & URL Access Scripting
  • From: Matthew Broms <email@hidden>
  • Date: Fri, 03 May 2002 09:08:20 -0400

Whoops - forgot one piece of vital information I guess. I have to stick
with OS 9. So while I was aware of shell scripting and my opinion doesn't
differ from yours much, I don't have access to this to my dismay (and I
don't approve of your harsh use of language :-).

Thanks much for your contribution because I will soon have to use this.

Matt

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


> From: Matthew Stuckwisch <email@hidden>
> Date: Thu, 2 May 2002 19:54:49 -0500
> To: Matthew Broms <email@hidden>
> Cc: email@hidden
> Subject: Re: Cookies & URL Access Scripting
>
>> Is there anyway to include the passing of a cookie using the URL Access
>> Scripting mechanism?
>>
>> If not, is there any other scripting addition I can use to accomplish
>> this?
>
> Hmmm...with URL Access....I dunno, either way, don't use it, it's poo ^_-
> Pretty darned sure cookies can be passed along with curl *checks man curl*
> Yes, cookies can be done with curl.
>
> [localhost:~] guifa% man curl
> ...
> SYNOPSIS
> curl [options] [URL...]
>
> DESCRIPTION
> ...
> curl offers a busload of useful tricks like proxy support,
> user authentication, ftp upload, HTTP post, SSL (https:)
> connections, cookies, file transfer resume and more.
> ...
>
> OPTIONS
> ...
> -b/--cookie <name=data>
> (HTTP) Pass the data to the HTTP server as a
> cookie. It is supposedly the data previously
> received from the server in a "Set-Cookie:" line.
> The data should be in the format "NAME1=VALUE1;
> NAME2=VALUE2".
>
> If no '=' letter is used in the line, it is treated
> as a filename to use to read previously stored
> cookie lines from, which should be used in this
> session if they match. Using this method also acti-
> vates the "cookie parser" which will make curl
> record incoming cookies too, which may be handy if
> you're using this in combination with the
> -L/--location option. The file format of the file
> to read cookies from should be plain HTTP headers
> or the netscape cookie file format.
> ...
>
> -------
>
> Basically, from what I can tell (I don't know much about cookies), your
> code is going to look like this in your script:
>
> set theCookieData to "\"" & name1 & "=" & value1 & "; " & name2 & "=" &
> value2 & "; " & "\""
> set theURL to yourURL
> set thePage to (do shell script script "curl -b " & theCookeData & " " &
> theURL)
>
> That should work, /me thinks
>
>
> Matthew Stuckwisch
> [AIM/MSN]{GuifaSwimmer} | [Yahoo!]{SapphireTree} | [ICQ]{137477701}
> [IRC]{guifa / G}(esperNET / irc.massinova.com)
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Cookies & URL Access Scripting (From: Matthew Stuckwisch <email@hidden>)

  • Prev by Date: Re: How to play a audio CD playlist with apple script
  • Next by Date: Finder Whose by Modification date
  • Previous by thread: Re: Cookies & URL Access Scripting
  • Next by thread: Re: More newbie queries: paths
  • Index(es):
    • Date
    • Thread