Recipe 20.16 Fetching https: Web Pages

Recipe 20.16 Fetching https:// Web Pages

20.16.1 Problem

You want to work with a web server over a secure (SSL) connection. For example, you want to automate ordering supplies for your company from an online store, and the online store wisely protects its transactions with SSL.

20.16.2 Solution

Install Crypt::SSLeay and https: URLs automatically work with LWP. You do not need to reinstall LWP.

20.16.3 Discussion

When LWP sends a request to an https server, it checks whether there is a module installed to do SSL. The two modules that LWP can use are, in order of preference, Crypt::SSLeay and IO::Socket::SSL. Of the two, Crypt::SSLeay is the more fully featured, but requires the OpenSSL libraries from http://www.openssl.org.

20.16.4 See Also

The documentation for the CPAN module Crypt::SSLeay; the README.SSL file in the libwww-perl distribution



Perl Cookbook
Perl Cookbook, Second Edition
ISBN: 0596003137
EAN: 2147483647
Year: 2003
Pages: 501

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net