I want to post via HTTPS to a server using cURL.
The following code works but I'm not able to read the server's response !
is curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); the correct code for reading the server's response ?
Can anyone help ?
$URL="secure.server/transact.dll";
$fielpost="userID=testing";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://$URL");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$fielpost");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec ($ch);
$result = curl_exec ($ch);
curl_close ($ch);
Many thanks,
Badboy