Mac Web AppleScript AppleScript CGI CGI Macintosh AppleScript CGI MacOS CGI CGI (Common Gateway Interface) web UNIX web CGI Web UNIX CGI CGI FORM Web

Similar documents
オンラインテスト

wide94.dvi

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

第 7 回の内容 動的な Web サイト フォーム Web システムの構成

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ

インターネットマガジン1996年3月号―INTERNET magazine No.14

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web

LiveCode初心者開発入門サンプル

54 5 PHP Web hellow.php 1:<?php 2: echo "Hellow, PHP!Y=n"; 3:?> echo PHP C 2: printf("hellow, PHP!Y=n"); PHP (php) $ php hellow.php Hellow, PHP! 5.1.2

2009 Web B012-1

SHOBI_Portal_Manual

CAS Yale Open Source software Authentication Authorization (nu-cas) Backend Database Authentication Authorization Powered by A

johokiso-char.pdf.pdf

3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200,

Systemwalker IT Service Management Systemwalker IT Service Management V11.0L10 IT Service Management - Centric Manager Windows


(2 Linux Mozilla [ ] [ ] [ ] [ ] URL 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b

メディプロ1 Javaサーブレット補足資料.ppt

山梨県ホームページ作成ガイドライン

CodeIgniter Con 2011, Tokyo Japan, February

ohp.mgp

SR-X526R1 サーバ収容スイッチ ご利用にあたって

PowerPoint AppleScript

Servlet JSP JSP Servlet/JSP における 日 本 語 の 処 理 - 1


実験 5 CGI プログラミング 1 目的 動的にWebページを作成する手法の一つであるCGIについてプログラミングを通じて基本的な仕組みを学ぶ 2 実験 実験 1 Webサーバの設定確認と起動 (1)/etc/httpd/conf にある httpd.conf ファイルの cgi-bin に関する

( )!?

Android Windows 8 AP 9 AP ios & Android 10 ST 11 ST ios 12 ST Android 13 ST Win & Mac 14 ST ios 15 ST Android


help gem gem gem my help

Jlspec

shio_ PDF

untitled

hands_on_4.PDF

II 2 p.2 2 GET POST form action URL Aisatsu 2.1 Servlet GET GET : Query String QueryStringTest.java 1 import java.io.ioexception; 2 import java.io.pri

SR-X324T1/316T1 サーバ収容スイッチ ご利用にあたって

1

Plan of Talk CAS CAS 2 CAS Single Sign On CAS CAS 2 CAS Aug. 19, 2005 NII p. 2/32

スマートアヴェニュー ご利用マニュアル

FileMaker Server Getting Started Guide

Microsoft Word - Live Meeting Help.docx

guide.PDF

10 (1) s 10.2 rails c Rails 7 > item = PlanItem.new => #<PlanItem id nil, name nil,...> > item.name = "" => "" > item.valid? => true valid? true false

Web STEPS Web Web Form Cookie HTTP STEPS Web

Web JavaScript Java Applet Flash ActionScript CGI (C, perl, ruby ) PHP Servlet, JSP (JavaServer Pages) ASP 7-2

Moldplus_Server_4.12

ヤマハルーターのCLI:Command Line Interface

インストール取扱説明書

( ) Shift JIS ( ) ASCII ASCII ( ) 8bit = 1 Byte JIS(Japan Industrial Standard) X 0201 (X ) 2 Byte JIS ISO-2022-JP, Shift JIS, EUC 1 Byte 2 By

Microsoft Word - D JP.docx

Microsoft Word PAX4_Manual_JP.doc

FileMaker Server 9 Getting Started Guide

TeraTerm Pro V.2.32の利用法

事例に見るSCORMの・・・

Oracle Lite Tutorial

付録B


SR-X324T2/316T2 サーバ収容スイッチ ご利用にあたって

Sinatra と MongoDB 今回は Sinatra で MongoDB の操作を体験してみます 進捗に合わせて ドライバから Ruby で使える便利な ORM の紹介をします

untitled

pdf

JavaScript の使い方

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

IP.dvi

Transcription:

(mact@antares.ecn.fpu.ac.jp) PDF 1997 10 3 The BASIC PDF Macintosh Web CGI EasyBBS CGI The BASIC DOS, DOS/V, WIN Mac PDF PDF Web Macintosh LC475 Web Mac Mac Web Web CGI Web CGI MacOS Web CGI AppleScript CGI Web CGI MacOS Web AppleScript 1

Mac Web AppleScript AppleScript CGI CGI Macintosh AppleScript CGI MacOS CGI CGI (Common Gateway Interface) web UNIX web CGI Web UNIX CGI CGI FORM Web Web Web Interactive Intercreative CGI CGI OS MacOS MacOS AppleEvent CGI CGI Web UNIX CGI MacOS MacOS System 7 AppleEvent MacOS Web CGI MacHTTP Web 2

MacHTTP CGI CGI Web MacOS CGI MacOS AppleScript CGI AppleScript CGI MacOS CGI CGI CGI CGI CGI AppleEvent CGI class=wwwω ID=sdoc AppleEvent FORM AppleEvent Appendix AppleEvent CGI reply CGI AppleEvent CGI reply MacOS CGI AppleEvent reply AppleEvent AppleScript Frontier Userland HyperCard CGI UNIX CGI MacPerl Perl CGI CGI AppleScript System 7.5 Talk7.5 AppleScript 3

Web CGI AppleScript CGI FORM FORM <FORM METHOD="POST" ACTION="form.acgi"> <INPUT TYPE="TEXT" Name="Title" SIZE=50><P> <INPUT TYPE="TEXT" NAME="Name" SIZE=40><P> <BR> <TEXTAREA NAME="MSG" COLS=70 ROWS=5></TEXTAREA><P> <INPUT TYPE="SUBMIT" VALUE="POST"> <INPUT TYPE="Reset" VALUE="Clear"> </FORM> FORM FORM ACTION form.acgi FORM CGI.acgi Mac CGI.cgi.acgi CGI.cgi CGI AppleEvent 4

CGI reply.acgi CGI AppleEvent CGI reply CGI CGI.acgi CGI CGI MacOS CGI.cgi.acgi POST Web form.acgi AppleEvent AppleEvent class=post form.acgi on «event WWWΩsdoc» given «class post»:post_args return end «event WWWΩsdoc» * «option + < *» option + shift + > * Ω option + z AppleEvent (class= WWWΩ, ID=sdoc) AppleScript AppleEvent «event XXXXyyyy» (XXXX = Event Class, yyyy = Event ID) AppleEvent AppleScript «event XXXXyyyy» AppleEvent return HTML HTTP HTTP HTTP CGI CGI CGI 5

HTTP/1.0 200 OK Server: MacHTTP MIME-Version: 1.0 Content-type: text/html return+linefeed (CR + LF) property form.acgi Thank you property crlf : (ASCII character 13) & (ASCII character 10) property http_10_header : "HTTP/1.0 200 OK" & crlf & "Server: MacHTTP" & crlf & "MIME-Version: 1.0" & crlf & "Content-type: text/html" & crlf & crlf on «event WWWΩsdoc» given «class post»:post_args return http_10_header & "<TITLE>Thank You</TITLE>" & crlf & "<h3> </h3>" end «event WWWΩsdoc» class = post post_args post_args Web(HTTP) FORM Form URL = & FORM Web CGI POST form.acgi post_args Title=Web%20%82%C9%89%EF%8Bc%8E%BA%82%F0&Name=%93c%92%86%8B%81%94V&MSG =CGI%20%82%C5%89%EF%8Bc%8E%BA%82%F0%8D%EC%82%E9 6

%XX (XX ASCII HEX URL & Title=Web%20%82%C9%89%EF%8Bc%8E%BA%82%F0 Name=%93c%92%86%8B%81%94V MSG=CGI%20%82%C5%89%EF%8Bc%8E%BA%82%F0%8D%EC%82%E9 = Web%20%82%C9%89%EF%8Bc%8E%BA%82%F0 %93c%92%86%8B%81%94V CGI%20%82%C5%89%EF%8Bc%8E%BA%82%F0%8D%EC%82%E9 %XX Web CGI Mac WINDOWS SHIFT-JIS (SJIS) UNIX EUC JIS Mac SJIS FORM CGI EUC JIS SJIS CGI post_args post_args 7

AppleScript osax osax AppleScript AppleScript Scripting Additions osax AppleScript CGI osax Tanaka's osax CGI AppleScript AppleScript osax osax HyperTalk CompileIt! HyperTalk osax Tanaka's osax URL 1.0b10 Tanaka's Tool <http://mtlab.ecn.fpu.ac.jp/tanaka_tool.html> Tanaka's osax post_args set mylist to DecodeJArgs post_args mylist = {"Web ", " ","CGI "} SJIS form.acgi messages MSG_< > TimeStamp Tanaka's osax Mac return osax xreturner return 8

property crlf : (ASCII character 13) & (ASCII character 10) property http_10_header : "HTTP/1.0 200 OK" & crlf & "Server: MacHTTP" & crlf & "MIME-Version: 1.0" & crlf & "Content-type: text/html" & crlf & crlf property msgfldr : "Macintosh HD:myServer:messages:" on «event WWWΩsdoc» given «class post»:post_args set mylist to DecodeJArgs post_args set mydata to " :" & (item 1 of mylist) & return & " " & (item 2 of mylist) & return & " " & return & (xreturner (item 3 of mylist)) set myfile to msgfldr & "MSG_" & (TimeStamp) writetofile mydata to file myfile return http_10_header & "<TITLE>Thank You</TITLE>" & crlf & "<h3> </h3>" end «event WWWΩsdoc» * msgfldr CGI Stay Open) (Never Show Startup Screen) CGI 9

form.acgi Mac CGI CGI FORM CGI form.acgi HTML HTML 10

CGI CGI NetNews NetNews 11

FORM FORM CGI FORM CGI bbs.acgi CGI CGI CGI CGI CGI search_args CGI URL? http://your.host/bbs.acgi?hello URL? hello search_args bbs.acgi CGI Mac class=kfor CGI CGI search_args post_args search_args post_args search_args post_args search_args MSG_XXXXX post_args search_args ADD_ + post_args 12

bbs.acgi property crlf : (ASCII character 13) & (ASCII character 10) property http_10_header : "HTTP/1.0 200 OK" & crlf & "Server: MacHTTP" & crlf & "MIME-Version: 1.0" & crlf & "Content-type: text/html" & crlf & crlf property redirect_header : "HTTP/1.0 302 Found" & crlf & "Server: WebSTAR/1.0 ID/ACGI" & crlf & "MIME-Version: 1.0" & crlf & "Location: " property msgfldr : "Macintosh HD:myServer:messages:" on «event WWWΩsdoc» given «class kfor»:search_args, «class post»:post_args try if search_args = "" then if post_args = "" then return toppage() else return makenew(post_args) end if else if "ADD_" is in search_args then return addcomment(search_args, post_args) else if "MSG_" is in search_args then return showpage(search_args) else error "CGI " end if on error errmsg return http_10_header & "<TITLE>Error</TITLE>" & crlf & "<h3>cgi </H3>" & crlf end try end «event WWWΩsdoc» & "<B>" & errmsg & "</B>" * redirect_header property 13

form.acgi post.html FORM HTML form.acgi return form.acgi form.acgi redirect redirect HTTP/1.0 302 Found Server: MacHTTP MIME-Version: 1.0 Location: <URL> CR+LF <URL> CGI URL redirect redirect property CGI URL redirect URL reload 14

makenew on makenew(post_args) post_args set mylist to DecodeJArgs post_args set mytitle to item 1 of mylist set myname to item 2 of mylist set mymsg to item 3 of mylist return set mymsg to xreturner mymsg < > set mymsg to xreplace mymsg search "<" replace "<" set mymsg to xreplace mymsg search ">" replace ">" HTML <PRE> set mypage to "<TITLE>" & mytitle & "</TITLE>" & return & "<H2>" & mytitle & "</H2>" & return & "<H3> " & myname & "</H3>" & return & "<TT>(Date: " & ((current date) as string) & ")</TT><P><HR><P>" & return & "<PRE>" & mymsg & "</PRE><P><HR size=4><p>" & return set myfile to "MSG_" & (TimeStamp) writetofile mypage to file (msgfldr & myfile) redirect URL crlf return redirect_header & "bbs.acgi?" & myfile & crlf & crlf end makenew * xreplace Tanaka's osax 15

search_args FORM return FORM HTML " ACTION on showpage(search_args) set mypage to readfromfile file (msgfldr & search_args) return http_10_header & mypage & return & "<FORM METHOD= "POST " ACTION= "bbs.acgi?add_" & search_args & " ">" & return & "<H4> </H4><P>" & return & " :<INPUT TYPE=text NAME=name SIZE=40><p>" & return & "<TEXTAREA NAME=comt ROWS=5 COLS=70></TEXTAREA><P>" & return & "<INPUT TYPE=submit VALUE= "Post Comment "><INPUT TYPE=reset VALUE= "Reset ">" & return & "</FORM><P><HR><P><h4><UL>" & return & "<LI><A HREF= "bbs.acgi ">Top Page</A></UL></H4><HR><P>" end showpage * readfromfile Tanaka's osax 16

search_args ADD_ + ADD_ post_args redirect search_args ADD_ URL on addcomment(search_args, post_args) set AppleScript's text item delimiters to {""} set tgpage to (characters 5 through -1 of search_args) as string post_args set mylist to DecodeJArgs post_args set myname to item 1 of mylist set mymsg to item 2 of mylist return set mymsg to xreturner mymsg < > set mymsg to xreplace mymsg search "<" replace "<" set mymsg to xreplace mymsg search ">" replace ">" set mydata to "<B>" & myname & "</B> <BR>" & return & "<TT>( Date: " & ((current date) as string) & ")</TT><p>" & return & "<PRE>" & mymsg & "</PRE><HR><P>" & return appendtofile mydata to file (msgfldr & tgpage) return redirect_header & "bbs.acgi?" & tgpage & crlf & crlf end addcomment * apendtofile Tanaka's osax 17

Web CGI CGI CGI BBS_Header BBS_Footer Tanaka's osax dirlister <TITLE> Tanaka's osax getpagetitle mylist AppleScript text item delimiter return mylist set mylist to "" repeat with x from 1 to 1000 set mylist to mylist & (x as string) & " " & return end repeat Quadra 840AV set mylist to {} repeat with x from 1 to 1000 set end of mylist to (x as string) & " " end repeat set AppleScript's text item delimiters to {return} set mylist to mylist as string 18

set AppleScript's text item delimiters to {""} text item delimiter return AppleScript text item delimiter AppleScript toppage on toppage() try set mylist to dirlister alias msgfldr ofname "MSG_" on error set mylist to {} end try set mymsgnm to count items of mylist set mydata to {} set end of mydata to ((current date) as string) set end of mydata to "<P><H4> " & (mymsgnm as string) & " </H4>" if mymsgnm 0 then set end of mydata to " <UL>" repeat with myf in mylist set tgf to alias (msgfldr & myf) set mytitle to getpagetitle tgf set end of mydata to "<LI><B><A HREF= "bbs.acgi?" & myf & " ">" & mytitle & "</B></A><BR>" set end of mydata to "<TT>( " & ((modification date of (info for tgf)) as string) & " )</TT><P>" end repeat set end of mydata to "</UL><P>" 19

end if mydata set AppleScript's text item delimiters to {return} set mydata to mydata as string set AppleScript's text item delimiters to {""} set myheader to readfromfile file "Macintosh HD:myServer:BBS_header" set myfooter to readfromfile file "Macintosh HD:myServer:BBS_footer" return return http_10_header & myheader & mydata & myfooter end toppage * post.html BBS_footer bbs.acgi bbs.acgi bbs.acgi BBS_header BBS_footer post.html Web bbs.acgi 20

http://your.host/bbs.acgi your.host Web IP AppleScript CGI Web Scripter's Meeting <http://mtlab.ecn.fpu.ac.jp/webcon.mtxt> 21

MacOS Web CGI EasyBBS EasyBBS <http://mtlab.ecn.fpu.ac.jp/easybbs/> Web Scripter's Meeting Tanaka's osax EasyBBS Macintosh Cyber Barbarians "Planning and Managing WEB SITES on the Macintosh" Jon Wiederspan & Chuck Shotton Addison Wesley Developer Press 22

Appendix : CGI AppleEvent class path_args ('----') URL $ search_args ('kfor') URL? post_args ('post') METHOD=POST FORM method ('meth') GET POST client_address ('addr') IP Web username ('user') REALM password ('pass') --- REALM from_user ('frmu') E-mail server_name ('svnm') Web IP Web server_port ('svpt') Web script_name ('scnm') CGI URL content_type ('ctyp') CGI 23

MIME referer ('refr') CGI URL CGI user_agent ('Agnt') WebSTAR action ('Kact') CGI Action action_path ('Kapt') CGI client_ip ('Kcip') IP full_request ('Kfrq') WebSTAR 24