X-Git-Url: http://git.maemo.org/git/?p=dh-make-perl;a=blobdiff_plain;f=dev%2Farm%2Flibnet-ssleay-perl%2Flibnet-ssleay-perl-1.35%2Fexamples%2Fget_page.pl;fp=dev%2Farm%2Flibnet-ssleay-perl%2Flibnet-ssleay-perl-1.35%2Fexamples%2Fget_page.pl;h=6e367396260e045608bb07ca1cf8f1a968b5b056;hp=0000000000000000000000000000000000000000;hb=f477fa73365d491991707e7ed9217b48d6994551;hpb=da95c414033799c3a62606f299c3c00b5c77ca11 diff --git a/dev/arm/libnet-ssleay-perl/libnet-ssleay-perl-1.35/examples/get_page.pl b/dev/arm/libnet-ssleay-perl/libnet-ssleay-perl-1.35/examples/get_page.pl new file mode 100755 index 0000000..6e36739 --- /dev/null +++ b/dev/arm/libnet-ssleay-perl/libnet-ssleay-perl-1.35/examples/get_page.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl +# 8.6.1998, Sampo Kellomaki +# Get a page via HTTP and print some info about it. + +use Net::SSLeay; + +($site, $port, $path) = @ARGV; +die "Usage: ./get_page.pl www.cryptsoft.com 443 /\n" unless $path; + +($page, $result, %headers) = &Net::SSLeay::get_https($site, $port, $path); + +print "Result was `$result'\n"; +foreach $h (sort keys %headers) { + print "Header `$h'\tvalue `$headers{$h}'\n"; +} + +print "=================== Page follows =================\n"; +print $page; + +__END__