cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

cURL POST too slow

From: <chad_at_buglogic.com>
Date: Mon, 1 Mar 2004 16:08:01 -0500

on system running FreeBSD php 4.3.4

libcurl/7.10.7 OpenSSL/0.9.7a ipv6 zlib/1.1.4

i'm trying to communicate with a payment gateway with a cURL POST. After about a minute+ the POST happens fine.

how can i speed this up? a regular html post to the payment gateway takes 1 second. cURL takes over a minute..

$ch = curl_init();
   curl_setopt ($ch, CURLOPT_URL, $url);
   curl_setopt ($ch, CURLOPT_POST, 1);
   curl_setopt ($ch, CURLOPT_POSTFIELDS, $params);
   curl_setopt ($ch, CURLOPT_POSTFIELDSIZE, 0);
  // curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
   curl_setopt ($ch, CURLOPT_HEADER, 0);
   curl_setopt ($ch, CURLOPT_SSLVERSION, 3);
   curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
   $result = curl_exec ($ch);
   $array1 = array();
   $array1 = curl_getinfo($ch);
   $code = $array1['http_code'];
   $codestring = "http_code " .$code ." " .curl_error ($ch);
   curl_close ($ch);
   echo $result;
Received on 2004-03-01