[php] https met curl wil niet.

Pagina: 1
Acties:

  • kvdveer
  • Registratie: November 2000
  • Laatst online: 06-11-2025
Ik ben een beetje aan het kloten met curl, maar ik krijg het niet voor elkaar.
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?
$ch = curl_init ("https://secure-test.bibit.com/jsp/merchant/xml/paymentService.jsp");
$fp = fopen ("php_response.txt", "w");
$fp1 = fopen ("php_err.txt", "w");

curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_STDERR, $fp1);
curl_setopt ($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_MUTE, 0);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_FAILONERROR, 0);
curl_setopt ($ch, CURLOPT_SSLVERSION, 2);
curl_setopt ($ch, CURLOPT_USERPWD, "***:***");
// undocumented feature... gebruik een randombestandje...
curl_setopt ($ch, CURLOPT_RANDOM_FILE, "c:\PUTTY.RND"); 


echo curl_version();     
echo curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
?>

in php_response.txt staat niets (0 bytes)
in php_err.txt staat
code:
1
* Closing live connection (#0)

Localhost, sweet localhost


  • kvdveer
  • Registratie: November 2000
  • Laatst online: 06-11-2025
[mode=desperate]
^^
[/mode]

Localhost, sweet localhost


  • kvdveer
  • Registratie: November 2000
  • Laatst online: 06-11-2025
[mode=suicidal]
^^
[/mode]

Localhost, sweet localhost


Verwijderd

Heb het zelfde probleem....
HTTP calls werken prima.

  • NMe
  • Registratie: Februari 2004
  • Laatst online: 22:23

NMe

Quia Ego Sic Dico.

[mode=afteltopic]Op een bericht van 2½ jaar geleden replyen? :?[/mode]

Er staat vast wel iets op http://www.php.net/curl

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.