Ahh, you had the same problem as I.  Fortunately, I've worked out a pretty
good fix.  It makes use of the CURL module in PHP.  I think CURL comes
standard in the 4.x versions of PHP,  but I'm not sure.

Anywho, here's the code:

------BEGIN CODE---------
$ch = curl_init("https://url.authnet.com";);
$data =
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
$buf = curl_exec ($ch); //execute post and get results
curl_close ($ch);
-----END CODE-----

Be sure to include the 'https://' in the curl_init() function.  That is what
tells the program that all the data should be encoded.  Obviously, the
'$data' variable holds all the post data and you can, of course, build this
string on the fly with form data etc.

Pretty simple once you know how to do it.

Best regards,

Jeremy Reed
"David Johansen" <[EMAIL PROTECTED]> wrote in message
> Could someone tell me where I could get a basic Authorize.net example to
> work off of. I'm sure that I could do it all from scratch, but a base to
> start from would be nice and make it a lot faster. Thanks,
> Dave

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to