cURL Cutting Off Last Character
| From: | Jonathan Hilgeman | Date: | Tue, 27 Nov 2001 21:14:58 +0000 |
| Subject: | cURL Cutting Off Last Character | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-5104@lists.php.net to get a copy of this message | ||
I use cURL to perform CC transactions and it returns a result string
(declined, accepted, etc...), but the message it returns is cut off. There's
one character missing on the end of the string, an "e". Here's my code:
$ch = curl_init($gateway_url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data_string);
$results = curl_exec ($ch);
curl_close ($ch);
print $results;
The above should print "Account inactive" but I get "Account inactiv". I
KNOW it's working via other methods that I have tried, but I need to use
this one. I'm running FreeBSD 4.2, PHP 4.0.3, cURL 7.5.1 (I think), and
Apache 1.3.14+ModSSL.
- Jonathan