/ BBS in a Box 11
/ AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Tele / Internet / MacHTTP 1.2.1.sit / MacHTTP 1.2.1 / sample.script ![]() | < prev | next > |
MacBinary | 1993-10-06 | 2.5 KB | [TEXT/ToyS] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, inited, Wed Oct 6 12:06:46 1993, modified Wed Oct 6 12:06:46 1993, creator 'ToyS', type ASCII, 2026 bytes "sample.script" , at 0x86a 328 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [ToyS] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 73 61 6d 70 6c 65 | 2e 73 63 72 69 70 74 00 |..sample|.script.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 54 6f 79 | 53 01 00 00 00 00 00 00 |.TEXTToy|S.......|
|00000050| 00 00 00 00 00 07 ea 00 | 00 01 48 a8 d8 9d 96 a8 |........|..H.....|
|00000060| d8 9d 96 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a8 3a 00 00 |........|.....:..|
|00000080| 2d 2d 20 54 68 69 73 20 | 73 63 72 69 70 74 20 64 |-- This |script d|
|00000090| 65 6d 6f 6e 73 74 72 61 | 74 65 73 20 75 73 69 6e |emonstra|tes usin|
|000000a0| 67 20 41 70 70 6c 65 53 | 63 72 69 70 74 20 77 69 |g AppleS|cript wi|
|000000b0| 74 68 20 4d 61 63 48 54 | 54 50 20 74 6f 20 67 65 |th MacHT|TP to ge|
|000000c0| 6e 65 72 61 74 65 0d 2d | 2d 20 64 79 6e 61 6d 69 |nerate.-|- dynami|
|000000d0| 63 20 57 6f 72 6c 64 20 | 57 69 64 65 20 57 65 62 |c World |Wide Web|
|000000e0| 20 64 6f 63 75 6d 65 6e | 74 73 2e 0d 2d 2d 0d 2d | documen|ts..--.-|
|000000f0| 2d 20 4d 61 63 48 54 54 | 50 20 77 69 6c 6c 20 6f |- MacHTT|P will o|
|00000100| 6e 6c 79 20 72 65 61 64 | 20 61 6e 64 20 65 78 65 |nly read| and exe|
|00000110| 63 75 74 65 20 73 63 72 | 69 70 74 73 20 74 68 61 |cute scr|ipts tha|
|00000120| 74 20 68 61 76 65 20 62 | 65 65 6e 20 73 61 76 65 |t have b|een save|
|00000130| 64 20 61 73 0d 2d 2d 20 | 74 65 78 74 20 6f 6e 6c |d as.-- |text onl|
|00000140| 79 2e 20 4f 6e 63 65 20 | 74 68 65 20 73 63 72 69 |y. Once |the scri|
|00000150| 70 74 20 69 73 20 6c 6f | 61 64 65 64 20 62 79 20 |pt is lo|aded by |
|00000160| 4d 61 63 48 54 54 50 2c | 20 69 74 20 69 73 20 70 |MacHTTP,| it is p|
|00000170| 61 73 73 65 64 20 74 6f | 20 74 68 65 20 64 65 66 |assed to| the def|
|00000180| 61 75 6c 74 0d 2d 2d 20 | 73 63 72 69 70 74 69 6e |ault.-- |scriptin|
|00000190| 67 20 73 79 73 74 65 6d | 20 28 75 73 75 61 6c 6c |g system| (usuall|
|000001a0| 79 20 41 70 70 6c 65 53 | 63 72 69 70 74 29 20 66 |y AppleS|cript) f|
|000001b0| 6f 72 20 79 6f 75 72 20 | 73 65 72 76 65 72 20 66 |or your |server f|
|000001c0| 6f 72 20 65 78 65 63 75 | 74 69 6f 6e 2e 0d 2d 2d |or execu|tion..--|
|000001d0| 20 4d 61 63 48 54 54 50 | 20 70 72 65 70 65 6e 64 | MacHTTP| prepend|
|000001e0| 73 20 74 68 65 20 73 63 | 72 69 70 74 27 73 20 73 |s the sc|ript's s|
|000001f0| 6f 75 72 63 65 20 63 6f | 64 65 20 77 69 74 68 20 |ource co|de with |
|00000200| 61 20 6c 69 6e 65 20 74 | 68 61 74 20 69 73 20 74 |a line t|hat is t|
|00000210| 68 65 20 65 71 75 69 76 | 61 6c 65 6e 74 20 6f 66 |he equiv|alent of|
|00000220| 3a 0d 2d 2d 20 73 65 74 | 20 68 74 74 70 5f 72 65 |:.-- set| http_re|
|00000230| 71 75 65 73 74 20 74 6f | 20 22 3c 72 65 71 75 65 |quest to| "<reque|
|00000240| 73 74 20 66 72 6f 6d 20 | 63 6c 69 65 6e 74 3e 22 |st from |client>"|
|00000250| 0d 2d 2d 20 77 68 65 72 | 65 20 3c 72 65 71 75 65 |.-- wher|e <reque|
|00000260| 73 74 20 66 72 6f 6d 20 | 63 6c 69 65 6e 74 3e 20 |st from |client> |
|00000270| 69 73 20 74 68 65 20 61 | 63 74 75 61 6c 20 64 61 |is the a|ctual da|
|00000280| 74 61 20 72 65 63 65 69 | 76 65 64 20 66 72 6f 6d |ta recei|ved from|
|00000290| 20 74 68 65 20 57 57 57 | 20 63 6c 69 65 6e 74 2e | the WWW| client.|
|000002a0| 0d 2d 2d 0d 2d 2d 20 54 | 68 65 20 72 65 73 75 6c |.--.-- T|he resul|
|000002b0| 74 20 6f 66 20 74 68 65 | 20 73 63 72 69 70 74 20 |t of the| script |
|000002c0| 65 78 65 63 75 74 69 6f | 6e 20 69 73 20 74 68 65 |executio|n is the|
|000002d0| 6e 20 72 65 74 75 72 6e | 65 64 20 74 6f 20 74 68 |n return|ed to th|
|000002e0| 65 20 63 6c 69 65 6e 74 | 20 61 73 20 61 20 48 54 |e client| as a HT|
|000002f0| 4d 4c 0d 2d 2d 20 64 6f | 63 75 6d 65 6e 74 2e 20 |ML.-- do|cument. |
|00000300| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 73 63 |The foll|owing sc|
|00000310| 72 69 70 74 20 73 68 6f | 77 73 20 68 6f 77 20 74 |ript sho|ws how t|
|00000320| 6f 20 74 75 72 6e 20 41 | 70 70 6c 65 53 63 72 69 |o turn A|ppleScri|
|00000330| 70 74 20 72 65 73 75 6c | 74 73 20 69 6e 74 6f 20 |pt resul|ts into |
|00000340| 48 54 4d 4c 2e 0d 0d 73 | 65 74 20 66 69 6c 65 5f |HTML...s|et file_|
|00000350| 70 61 74 68 20 74 6f 20 | 22 3a 22 20 2d 2d 20 69 |path to |":" -- i|
|00000360| 66 20 74 68 69 73 20 73 | 63 72 69 70 74 20 69 73 |f this s|cript is|
|00000370| 20 69 6e 20 61 20 73 75 | 62 64 69 72 65 63 74 6f | in a su|bdirecto|
|00000380| 72 79 20 62 65 6c 6f 77 | 20 4d 61 63 48 54 54 50 |ry below| MacHTTP|
|00000390| 2c 20 63 68 61 6e 67 65 | 20 74 68 69 73 20 74 6f |, change| this to|
|000003a0| 20 74 68 65 20 70 72 6f | 70 65 72 20 72 65 6c 61 | the pro|per rela|
|000003b0| 74 69 76 65 20 70 61 74 | 68 0d 0d 2d 2d 20 43 72 |tive pat|h..-- Cr|
|000003c0| 65 61 74 65 20 74 68 65 | 20 74 69 74 6c 65 20 66 |eate the| title f|
|000003d0| 6f 72 20 74 68 65 20 48 | 54 4d 4c 20 64 6f 63 75 |or the H|TML docu|
|000003e0| 6d 65 6e 74 0d 0d 73 65 | 74 20 68 65 61 64 65 72 |ment..se|t header|
|000003f0| 20 74 6f 20 22 3c 74 69 | 74 6c 65 3e 53 63 72 69 | to "<ti|tle>Scri|
|00000400| 70 74 20 54 65 73 74 20 | 4f 6e 65 3c 2f 74 69 74 |pt Test |One</tit|
|00000410| 6c 65 3e 3c 68 31 3e 54 | 68 69 73 20 69 73 20 61 |le><h1>T|his is a|
|00000420| 20 74 65 73 74 3a 3c 2f | 68 31 3e 22 0d 0d 2d 2d | test:</|h1>"..--|
|00000430| 20 41 64 64 20 73 6f 6d | 65 20 74 65 78 74 20 74 | Add som|e text t|
|00000440| 6f 20 74 68 65 20 62 6f | 64 79 20 6f 66 20 74 68 |o the bo|dy of th|
|00000450| 65 20 64 6f 63 75 6d 65 | 6e 74 0d 0d 73 65 74 20 |e docume|nt..set |
|00000460| 62 6f 64 79 20 74 6f 20 | 22 54 68 69 73 20 69 73 |body to |"This is|
|00000470| 20 61 20 74 65 73 74 20 | 6f 66 20 73 70 65 63 69 | a test |of speci|
|00000480| 61 6c 20 63 68 61 72 73 | 2e 20 53 65 65 20 5c 22 |al chars|. See \"|
|00000490| 53 70 6f 74 5c 22 20 72 | 75 6e 21 20 48 65 72 65 |Spot\" r|un! Here|
|000004a0| 27 73 20 61 20 62 61 63 | 6b 73 6c 61 73 68 20 2d |'s a bac|kslash -|
|000004b0| 3e 20 5c 5c 22 0d 0d 2d | 2d 20 53 68 6f 77 20 74 |> \\"..-|- Show t|
|000004c0| 68 65 20 63 75 72 72 65 | 6e 74 20 74 69 6d 65 20 |he curre|nt time |
|000004d0| 6f 6e 20 74 68 65 20 73 | 65 72 76 65 72 0d 0d 73 |on the s|erver..s|
|000004e0| 65 74 20 62 6f 64 79 20 | 74 6f 20 62 6f 64 79 20 |et body |to body |
|000004f0| 26 20 22 3c 68 32 3e 54 | 68 65 20 74 69 6d 65 20 |& "<h2>T|he time |
|00000500| 69 73 3a 3c 2f 68 32 3e | 22 20 26 20 28 63 75 72 |is:</h2>|" & (cur|
|00000510| 72 65 6e 74 20 64 61 74 | 65 29 0d 0d 2d 2d 20 54 |rent dat|e)..-- T|
|00000520| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 73 68 6f |he follo|wing sho|
|00000530| 77 73 20 68 6f 77 20 74 | 6f 20 72 65 66 65 72 65 |ws how t|o refere|
|00000540| 6e 63 65 20 74 68 65 20 | 61 72 67 73 20 70 61 73 |nce the |args pas|
|00000550| 73 65 64 20 69 6e 20 66 | 72 6f 6d 20 4d 61 63 48 |sed in f|rom MacH|
|00000560| 54 54 50 0d 0d 73 65 74 | 20 61 72 67 73 20 74 6f |TTP..set| args to|
|00000570| 20 22 3c 68 32 3e 41 72 | 67 75 6d 65 6e 74 73 20 | "<h2>Ar|guments |
|00000580| 70 61 73 73 65 64 20 69 | 6e 3a 3c 2f 68 32 3e 22 |passed i|n:</h2>"|
|00000590| 20 26 20 68 74 74 70 5f | 72 65 71 75 65 73 74 0d | & http_|request.|
|000005a0| 73 65 74 20 73 65 61 72 | 63 68 5f 61 72 67 73 20 |set sear|ch_args |
|000005b0| 74 6f 20 22 3c 68 32 3e | 53 65 61 72 63 68 20 61 |to "<h2>|Search a|
|000005c0| 72 67 75 6d 65 6e 74 73 | 3a 3c 2f 68 32 3e 22 20 |rguments|:</h2>" |
|000005d0| 26 20 68 74 74 70 5f 73 | 65 61 72 63 68 5f 61 72 |& http_s|earch_ar|
|000005e0| 67 73 0d 0d 2d 2d 20 53 | 68 6f 77 20 61 6c 6c 20 |gs..-- S|how all |
|000005f0| 74 68 65 20 66 69 6c 65 | 73 20 69 6e 20 74 68 65 |the file|s in the|
|00000600| 20 66 6f 6c 64 65 72 20 | 22 66 69 6c 65 5f 70 61 | folder |"file_pa|
|00000610| 74 68 22 20 61 6e 64 20 | 74 75 72 6e 20 48 54 4d |th" and |turn HTM|
|00000620| 4c 20 66 69 6c 65 73 20 | 69 6e 74 6f 20 61 6e 63 |L files |into anc|
|00000630| 68 6f 72 73 0d 0d 73 65 | 74 20 66 69 6c 65 6c 69 |hors..se|t fileli|
|00000640| 73 74 20 74 6f 20 22 3c | 68 32 3e 46 69 6c 65 73 |st to "<|h2>Files|
|00000650| 20 6f 6e 20 74 68 65 20 | 73 65 72 76 65 72 3a 3c | on the |server:<|
|00000660| 2f 68 32 3e 3c 75 6c 3e | 22 0d 73 65 74 20 6c 69 |/h2><ul>|".set li|
|00000670| 73 74 69 6e 67 20 74 6f | 20 28 6c 69 73 74 20 66 |sting to| (list f|
|00000680| 6f 6c 64 65 72 20 66 69 | 6c 65 20 66 69 6c 65 5f |older fi|le file_|
|00000690| 70 61 74 68 29 0d 72 65 | 70 65 61 74 20 77 69 74 |path).re|peat wit|
|000006a0| 68 20 69 20 66 72 6f 6d | 20 31 20 74 6f 20 74 68 |h i from| 1 to th|
|000006b0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 69 74 65 6d |e number| of item|
|000006c0| 73 20 69 6e 20 6c 69 73 | 74 69 6e 67 0d 09 73 65 |s in lis|ting..se|
|000006d0| 74 20 6f 6e 65 5f 66 69 | 6c 65 20 74 6f 20 69 74 |t one_fi|le to it|
|000006e0| 65 6d 20 69 20 6f 66 20 | 6c 69 73 74 69 6e 67 0d |em i of |listing.|
|000006f0| 09 69 66 20 6f 6e 65 5f | 66 69 6c 65 20 63 6f 6e |.if one_|file con|
|00000700| 74 61 69 6e 73 20 22 2e | 68 74 6d 6c 22 20 6f 72 |tains ".|html" or|
|00000710| 20 6f 6e 65 5f 66 69 6c | 65 20 63 6f 6e 74 61 69 | one_fil|e contai|
|00000720| 6e 73 20 22 2e 73 63 72 | 69 70 74 22 20 74 68 65 |ns ".scr|ipt" the|
|00000730| 6e 0d 09 09 73 65 74 20 | 66 69 6c 65 6c 69 73 74 |n...set |filelist|
|00000740| 20 74 6f 20 66 69 6c 65 | 6c 69 73 74 20 26 20 22 | to file|list & "|
|00000750| 3c 6c 69 3e 3c 61 20 68 | 72 65 66 3d 5c 22 22 20 |<li><a h|ref=\"" |
|00000760| 26 20 6f 6e 65 5f 66 69 | 6c 65 20 26 20 22 5c 22 |& one_fi|le & "\"|
|00000770| 3e 22 20 26 20 6f 6e 65 | 5f 66 69 6c 65 20 26 20 |>" & one|_file & |
|00000780| 22 3c 2f 61 3e 22 0d 09 | 65 6c 73 65 0d 09 09 73 |"</a>"..|else...s|
|00000790| 65 74 20 66 69 6c 65 6c | 69 73 74 20 74 6f 20 66 |et filel|ist to f|
|000007a0| 69 6c 65 6c 69 73 74 20 | 26 20 22 3c 6c 69 3e 22 |ilelist |& "<li>"|
|000007b0| 20 26 20 6f 6e 65 5f 66 | 69 6c 65 0d 09 65 6e 64 | & one_f|ile..end|
|000007c0| 20 69 66 0d 65 6e 64 20 | 72 65 70 65 61 74 0d 73 | if.end |repeat.s|
|000007d0| 65 74 20 66 69 6c 65 6c | 69 73 74 20 74 6f 20 66 |et filel|ist to f|
|000007e0| 69 6c 65 6c 69 73 74 20 | 26 20 22 3c 2f 75 6c 3e |ilelist |& "</ul>|
|000007f0| 22 0d 0d 2d 2d 20 73 65 | 6e 64 20 69 74 20 61 6c |"..-- se|nd it al|
|00000800| 6c 20 62 61 63 6b 20 74 | 6f 20 74 68 65 20 73 65 |l back t|o the se|
|00000810| 72 76 65 72 20 66 6f 72 | 20 74 72 61 6e 73 6d 69 |rver for| transmi|
|00000820| 73 73 69 6f 6e 20 74 6f | 20 74 68 65 20 63 6c 69 |ssion to| the cli|
|00000830| 65 6e 74 0d 0d 72 65 74 | 75 72 6e 20 68 65 61 64 |ent..ret|urn head|
|00000840| 65 72 20 26 20 62 6f 64 | 79 20 26 20 61 72 67 73 |er & bod|y & args|
|00000850| 20 26 20 73 65 61 72 63 | 68 5f 61 72 67 73 20 26 | & searc|h_args &|
|00000860| 20 66 69 6c 65 6c 69 73 | 74 0d 00 00 00 00 00 00 | filelis|t.......|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000880| 00 00 01 00 00 00 01 16 | 00 00 00 16 00 00 00 32 |........|.......2|
|00000890| 00 00 14 39 07 41 6c 69 | 61 73 65 73 00 00 15 14 |...9.Ali|ases....|
|000008a0| 07 41 6c 69 61 73 65 73 | 0d 00 00 00 14 39 07 43 |.Aliases|.....9.C|
|000008b0| 0d 73 61 6d 70 6c 65 2e | 73 63 72 69 70 74 02 00 |.sample.|script..|
|000008c0| 00 9a 54 45 58 54 54 6f | 79 53 01 00 00 34 00 c0 |..TEXTTo|yS...4..|
|000008d0| 00 9a 54 45 58 54 54 6f | 79 53 01 00 00 34 00 c0 |..TEXTTo|yS...4..|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 12 14 00 00 00 00 00 00 | 07 ea 00 00 01 48 76 74 |........|.....Hvt|
|00000900| 00 00 17 20 03 78 76 74 | 0b 00 00 00 14 3a 05 44 |... .xvt|.....:.D|
|00000910| 65 6d 6f 73 00 00 14 3b | 05 44 65 6d 6f 73 06 00 |emos...;|.Demos..|
|00000920| 00 00 14 3b 00 00 05 44 | 65 6d 6f 73 63 2e 68 2e |...;...D|emosc.h.|
|00000930| 72 72 6c 00 ff ff ff ff | ff ff ff ff 00 00 00 01 |rrl.....|........|
|00000940| 10 00 00 07 00 00 00 00 | 0e 00 00 00 14 3b 08 44 |........|.....;.D|
|00000950| 41 5f 73 74 75 66 66 2e | 00 00 14 47 08 44 41 5f |A_stuff.|...G.DA_|
|00000960| 73 74 75 66 66 00 0c 00 | 00 00 14 3c 06 63 64 65 |stuff...|...<.cde|
|00000970| 76 2e 68 2e 00 00 14 40 | 06 63 64 65 76 2e 68 00 |v.h....@|.cdev.h.|
|00000980| 00 00 00 12 00 2b 00 04 | 02 0b 02 f7 00 28 00 04 |.....+..|.....(..|
|00000990| 02 6d 02 f7 00 00 00 00 | 01 00 00 00 01 16 00 00 |.m......|........|
|000009a0| 00 16 00 00 00 32 00 76 | f7 e8 22 e4 00 00 00 1c |.....2.v|..".....|
|000009b0| 00 32 00 00 57 50 6f 73 | 00 00 00 0a 00 80 ff ff |.2..WPos|........|
|000009c0| 00 00 00 00 00 76 f5 bc | 00 00 00 00 00 00 00 00 |.....v..|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+