PHP & Authorize.net w/o cURL?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • William C. White

    PHP & Authorize.net w/o cURL?

    Does anyone know of a way to use PHP /w Authorize.net AIM without using
    cURL? Our website is hosted on a shared drive and the webhost company
    doesn't installed additional software (such as cURL) on the server because
    of that. Our site will have an SSL certificate next week, so I would like
    to use AIM instead of SIM, however, I don't know how to send data via POST
    over https and recieve data from the Authorize.net server over an https
    connection. Does anyone have experience with this?
    --
    William C. White
  • R. Rajesh Jeba Anbiah

    #2
    Re: PHP & Authorize.net w/o cURL?

    Jon Kraft <jon@jonux.co.u k> wrote in message news:<Xns93A46B ADADBE7jonjonux couk@130.133.1. 4>...[color=blue]
    > "William C. White" <u2ill@hotmail. com> wrote:
    >[color=green]
    > > Does anyone know of a way to use PHP /w Authorize.net AIM without
    > > using cURL? Our website is hosted on a shared drive and the webhost
    > > company doesn't installed additional software (such as cURL) on the
    > > server because of that. Our site will have an SSL certificate next
    > > week, so I would like to use AIM instead of SIM, however, I don't know
    > > how to send data via POST over https and recieve data from the
    > > Authorize.net server over an https connection. Does anyone have
    > > experience with this?[/color]
    >
    > You could use fsockopen (search for "POST" in the User Contributed Notes):
    > http://uk.php.net/fsockopen[/color]

    AFAIK, you cannot post data via fsockopen() to https server...

    ---
    "If there is a God, he must be a sadist"
    Email: rrjanbiah-at-Y!com

    Comment

    • Jon Kraft

      #3
      Re: PHP &amp; Authorize.net w/o cURL?

      ng4rrjanbiah@re diffmail.com (R. Rajesh Jeba Anbiah) wrote:[color=blue]
      > Jon Kraft <jon@jonux.co.u k> wrote:[color=green]
      >>
      >> You could use fsockopen (search for "POST" in the User Contributed
      >> Notes): http://uk.php.net/fsockopen[/color]
      >
      > AFAIK, you cannot post data via fsockopen() to https server...[/color]

      Since v4.3 there are different stream transports available (tcp, udp,
      ssl..). If PHP is built with OpenSSL, you can use them, e.g.:

      $fs = fsockopen("ssl://www.secureserve r.com", 443);



      HTH;
      JOn

      Comment

      • R. Rajesh Jeba Anbiah

        #4
        Re: PHP &amp; Authorize.net w/o cURL?

        Jon Kraft <jon@jonux.co.u k> wrote in message news:<Xns93A563 A3B8E73jonjonux couk@130.133.1. 4>...[color=blue]
        > ng4rrjanbiah@re diffmail.com (R. Rajesh Jeba Anbiah) wrote:
        >[color=green]
        > > Jon Kraft <jon@jonux.co.u k> wrote:[color=darkred]
        > >> ng4rrjanbiah@re diffmail.com (R. Rajesh Jeba Anbiah) wrote:
        > >> > Jon Kraft <jon@jonux.co.u k> wrote:
        > >> >>
        > >> >> You could use fsockopen (search for "POST" in the User Contributed
        > >> >> Notes): http://uk.php.net/fsockopen
        > >> >
        > >> > AFAIK, you cannot post data via fsockopen() to https server...
        > >>
        > >> Since v4.3 there are different stream transports available (tcp, udp,
        > >> ssl..). If PHP is built with OpenSSL, you can use them, e.g.:[/color]
        > >
        > > I see...
        > >[color=darkred]
        > >> $fs = fsockopen("ssl://www.secureserve r.com", 443);
        > >>
        > >> http://uk.php.net/manual/en/transports.php[/color]
        > >
        > > This manual page is not clear to me especially the "Table J-1.
        > > Context options for ssl:// and tls:// transports (since PHP 4.3.2)"
        > > There is no information about where to use the parameters like
        > > "verify_pee r". If you know more about the stuff, you may add some
        > > useful user notes there---that will be really helpful to others.[/color]
        >
        > I don't know, that stuff seems relatively new,[/color]

        Yes. When I moved to PHP 4.3.1, I've looked at the changelog
        which said fsockopen() can handle ssl://. I tried a lot, but it failed
        --- I think, I've used a wrong port.
        [color=blue]
        > but I should think you'd
        > use them as additional directives in php.ini? Someone?[/color]

        [color=blue]
        > PS: On this page is an example of posting to a secure server (Example 2):
        > http://uk.php.net/manual/en/ref.stream.php[/color]

        Thanks for pointing me this page. Nice example, but no info
        about "certificat es", "verify peer" stuffs.

        I feel, cURL is so handy than this fsockopen() version.

        ---
        "We live to die; we die to live"
        Email: rrjanbiah-at-Y!com

        Comment

        Working...