diff options
Diffstat (limited to 'pttpi/cgi')
-rw-r--r-- | pttpi/cgi/t/.cvsignore | 1 | ||||
-rw-r--r-- | pttpi/cgi/t/1.board.getBid.pl | 11 | ||||
-rw-r--r-- | pttpi/cgi/t/2.getBrdInfo.pl | 15 | ||||
-rw-r--r-- | pttpi/cgi/t/host.pl.sample | 2 |
4 files changed, 29 insertions, 0 deletions
diff --git a/pttpi/cgi/t/.cvsignore b/pttpi/cgi/t/.cvsignore new file mode 100644 index 00000000..9f20a79c --- /dev/null +++ b/pttpi/cgi/t/.cvsignore @@ -0,0 +1 @@ +host.pl diff --git a/pttpi/cgi/t/1.board.getBid.pl b/pttpi/cgi/t/1.board.getBid.pl new file mode 100644 index 00000000..04be5b89 --- /dev/null +++ b/pttpi/cgi/t/1.board.getBid.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl +use Frontier::Client; +use Data::Dumper; +do 'host.pl'; + +$brdname = $ARGV[0] || 'SYSOP'; +$server = Frontier::Client->new(url => $server_url); +$result = $server->call('board.getBid', $brdname); + +print "board.getBid($brdname) from $server_url:\n"; +print Dumper($result); diff --git a/pttpi/cgi/t/2.getBrdInfo.pl b/pttpi/cgi/t/2.getBrdInfo.pl new file mode 100644 index 00000000..a0ae95eb --- /dev/null +++ b/pttpi/cgi/t/2.getBrdInfo.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl +# $Id: 2.getBrdInfo.pl,v 1.1 2003/05/19 01:52:05 in2 Exp $ +use Frontier::Client; +use Frontier::RPC2; +use MIME::Base64; +use Data::Dumper; +do 'host.pl'; + +$bid = $ARGV[0] || 0; + +$server = Frontier::Client->new(url => $server_url); +$result = $server->call('board.getBrdInfo', $bid); + +print Dumper($result); +print decode_base64($result->{title}->value()); diff --git a/pttpi/cgi/t/host.pl.sample b/pttpi/cgi/t/host.pl.sample new file mode 100644 index 00000000..72669230 --- /dev/null +++ b/pttpi/cgi/t/host.pl.sample @@ -0,0 +1,2 @@ +#!/usr/bin/perl +$server_url = 'http://host_to_pttpi/path_to_pttpi/pttpi.cgi' |