What module is needed to allow scripts to post to HTTPS sites?

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default What module is needed to allow scripts to post to HTTPS sites?

    Hi

    I have been told that in order for my Perl script to be able to post
    to an https address, there needs to be an extra library/object
    installed on my server, like CURL for php. Can anyone tell me the name
    of the library? Is there just one or are there alternatives?

    Many thanks

    Pete

    petesouthwest@hotmail.com Guest

  2. Similar Questions and Discussions

    1. #26562 [Com]: fopen for https Sites does not work
      ID: 26562 Comment by: bhavin1194 at gmail dot com Reported By: sahin dot etik at web dot de Status: No Feedback...
    2. Free CGI scripts to search sites?
      All: Does anyone know of any free perl or PHP scripts to search such job sites as Dice, Monster, or Hotjobs? If so, would you please point me to...
    3. PHP HTTPS POST Como hacer un POST https con PHP
      http://wedoit4you.com/forums4you/display_message.php?Msg_pk_id=628 /** Author: Ing. Angel Leon Function: postHttps($url,$params) Given the...
    4. HTTPS POST?
      Is there anything in the standard .NET assemblies which will allow me to perform a HTTPS POST programmatically? I have a COM component to do this...
    5. xp & https sites
      i can't get into a https site. i have lower the settings and added the sites and cleaned out the trash. please help
  3. #2

    Default Re: What module is needed to allow scripts to post to HTTPS sites?


    [email]petesouthwest@hotmail.com[/email] wrote:
    > Hi
    >
    > I have been told that in order for my Perl script to be able to post
    > to an https address, there needs to be an extra library/object
    > installed on my server, like CURL for php. Can anyone tell me the name
    > of the library? Is there just one or are there alternatives?
    >
    > Many thanks
    >
    > Pete
    I think my host is using CPAN Perl?

    petesouthwest@hotmail.com Guest

  4. #3

    Default Re: What module is needed to allow scripts to post to HTTPS sites?

    On Wed, 02 Aug 2006 05:06:14 -0700, petesouthwest wrote:
    > I have been told that in order for my Perl script to be able to post
    > to an https address, there needs to be an extra library/object
    > installed on my server, like CURL for php. Can anyone tell me the name
    > of the library?
    CPAN: Crypt::SSLeay.
    > Is there just one or are there alternatives?
    Maybe Net::SSLeay would work equally; haven't tried.

    --
    Peter Scott
    [url]http://www.perlmedic.com/[/url]
    [url]http://www.perldebugged.com/[/url]

    Peter Scott Guest

  5. #4

    Default Re: What module is needed to allow scripts to post to HTTPS sites?


    <petesouthwest@hotmail.com> wrote in message
    news:1154520374.559629.264450@i3g2000cwc.googlegro ups.com...
    > Hi
    >
    > I have been told that in order for my Perl script to be able to post
    > to an https address, there needs to be an extra library/object
    > installed on my server, like CURL for php. Can anyone tell me the name
    > of the library? Is there just one or are there alternatives?
    >
    No expert on this - but I think there are alternatives.

    LWP::UserAgent has both a 'get' and 'post' method. Here's a simple script
    that does a https 'get':

    use warnings;
    use strict;
    use LWP::UserAgent;

    my $url = 'https://www.thawte.com';

    my $ua = new LWP::UserAgent;

    my $req = new HTTP::Request('GET', $url);

    my $res = $ua->request($req);

    if ($res->is_success) {print $res->as_string}

    else {print "Failed: ", $res->status_line, "\n"}

    __END__

    On my box that works because I have both IO::Socket::SSL and Net::SSLeay
    installed. (The latter is needed by the former.)
    If I rename either one of those modules (so that it cannot be found) the
    script fails with the message:

    Failed: 501 Protocol scheme 'https' is not supported (Crypt::SSLeay not
    installed)

    From that I deduce that Crypt::SSLeay is an alternative to the
    IO::Socket::SSL/Net::SSLeay combination. Crypt::SSLeay has not been updated
    in over 4 years ... so I'm a little wary (perhaps without justification) of
    it.

    There are probably other alternatives to LWP::UserAgent - eg WWW::Mechanize.
    I would think that they too utilize IO::Socket::SSL/Net::SSLeay and/or
    Crypt::SSLeay ... but I haven't checked.

    Cheers,
    Rob


    Sisyphus Guest

  6. #5

    Default Re: What module is needed to allow scripts to post to HTTPS sites?

    Sisyphus schreef:
    > petesouthwest:
    >> I have been told that in order for my Perl script to be able to post
    >> to an https address, there needs to be an extra library/object
    >> installed on my server, like CURL for php. Can anyone tell me the
    >> name of the library? Is there just one or are there alternatives?
    >
    > No expert on this - but I think there are alternatives.
    >
    > LWP::UserAgent has both a 'get' and 'post' method.
    > [....]
    > There are probably other alternatives to LWP::UserAgent - eg
    > WWW::Mechanize. I would think that they too utilize
    > IO::Socket::SSL/Net::SSLeay and/or Crypt::SSLeay ... but I haven't
    > checked.
    See also IO::All. From the documentation of IO::All::HTTPS
    "Note that in most cases it is simpler just to call
    io('https://example.com'), which calls the https method automatically.
    [...] The same operators from IO::All may be used. < GETs an HTTPS URL;
    > PUTs to an HTTPS URL."
    --
    Affijn, Ruud

    "Gewoon is een tijger."


    Dr.Ruud Guest

  7. #6

    Default Re: What module is needed to allow scripts to post to HTTPS sites?


    Peter Scott wrote:
    > On Wed, 02 Aug 2006 05:06:14 -0700, petesouthwest wrote:
    > > I have been told that in order for my Perl script to be able to post
    > > to an https address, there needs to be an extra library/object
    > > installed on my server, like CURL for php. Can anyone tell me the name
    > > of the library?
    >
    > CPAN: Crypt::SSLeay.
    >
    > > Is there just one or are there alternatives?
    >
    > Maybe Net::SSLeay would work equally; haven't tried.
    >
    > --
    > Peter Scott
    > [url]http://www.perlmedic.com/[/url]
    > [url]http://www.perldebugged.com/[/url]

    Thats great thank you all. I'm not up on Perl or webservers, so this
    helps a lot. My Host has said to offer SSL I would need to upgrade to a
    dedicated server :( at over £100
    a month.

    Is installing something like Crypt::SSLeay difficult? Any ideas why I
    should need to upgrade to a dedicated server in order to get SSL
    support?

    Can I just clarify how this relates to having an SSL cert? When i have
    asked this question to other poeple they have started talking about
    secure sites. but isnt that different from support for the SSL
    protocol?

    Many thanks
    Pete

    petesouthwest@hotmail.com Guest

  8. #7

    Default Re: What module is needed to allow scripts to post to HTTPS sites?

    On Wed, 02 Aug 2006 08:44:20 -0700, petesouthwest wrote:
    > Peter Scott wrote:
    >> On Wed, 02 Aug 2006 05:06:14 -0700, petesouthwest wrote:
    >> > I have been told that in order for my Perl script to be able to post
    >> > to an https address, there needs to be an extra library/object
    >> > installed on my server, like CURL for php. Can anyone tell me the name
    >> > of the library?
    >>
    >> CPAN: Crypt::SSLeay.
    >
    > Thats great thank you all. I'm not up on Perl or webservers, so this
    > helps a lot. My Host has said to offer SSL I would need to upgrade to a
    > dedicated server :( at over £100
    > a month.
    That of course is completely unrelated to your original question, which
    was about accessing a site, not serving a site.
    > Is installing something like Crypt::SSLeay difficult?
    Usually not; YMMV.
    > Any ideas why I
    > should need to upgrade to a dedicated server in order to get SSL
    > support?
    They're using it as an excuse to make more money? :-)
    > Can I just clarify how this relates to having an SSL cert? When i have
    > asked this question to other poeple they have started talking about
    > secure sites. but isnt that different from support for the SSL protocol?
    Your problem appears to be clarifying what it is that you want, because I
    cannot tell why you are talking about posting to an https address at the
    same time as serving a secure site. Unless what you mean by 'post' is
    different from the usual interpretation of an HTTP request. What *do* you
    mean by 'post'?

    --
    Peter Scott
    [url]http://www.perlmedic.com/[/url]
    [url]http://www.perldebugged.com/[/url]

    Peter Scott Guest

  9. #8

    Default Re: What module is needed to allow scripts to post to HTTPS sites?

    [email]petesouthwest@hotmail.com[/email] escribió:
    > Hi
    >
    > I have been told that in order for my Perl script to be able to post
    > to an https address, there needs to be an extra library/object
    > installed on my server, like CURL for php. Can anyone tell me the name
    > of the library? Is there just one or are there alternatives?
    >
    > Many thanks
    >
    > Pete
    >
    Crypt::SSLeay is maintained to enable https requests wia libwww (LWP)
    so install that if you use LWP

    Net::SSLeay is the way to go for new code.

    both depend on openssl. see [url]www.openssl.org[/url] to install it.

    if you want to use the curl perl modules(like WWW::Curl::Easy), you'll
    need libcurl with
    openssl support

    overall highly OS-dependent as you need to build C libraries
    the openssl build process has become worse lately on some platforms
    as libopenssl has been split in two (one has become a dependency of the
    other and tries to load ./libXXX instead of the full path)
    if your platform uses /usr/local or /usr/lib only everything is OK.

    hth
    --stephan
    Stephan Titard Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139