#! /usr/local/bin/ruby ua = ENV['HTTP_USER_AGENT'] print "Content-type: text/html\n\n" print <<END <html> <head> <title>ユーザーエージェント取得・表示</title> </head> <body> #{ua}<br> </body> </html> END exit