cURL / Mailing Lists / curl-users / Single Mail

curl-users

HTTPS POST WITH CURL AND PHP

From: jortiz <jortiz_at_launchpadonline.com>
Date: Mon, 28 Apr 2003 14:13:24 -0400

 

Hi! I'm new to cURL so maybe someone can help me. I'm trying to send
data via a php page to an xml request. I've used NUSOAP using http and
it works just fine. When I try to use https it times out with no error.

 

Here is my code:

 

<?

require_once("nusoap.php");

 

$BI="000000021";

$FN="Larry";

$LN="Riemo0";

$PN="5137771000";

$xml="&lt;CC-CALLS xmlns='urn:www-callcommand-com:schema.cc-calls'
dataProvider='mycarcasino.com' batchIdentifier='$BI'&gt;&lt;Call
subscriber='JOTO' campaign='10002' firstName='$FN' lastName='$LN'
phoneNumber='$PN'/&gt;&lt;/CC-CALLS&gt;";

 

 

// set parameter parameters

$parameters = "<ImportFile
xmlns=\"urn:www-callcommand-com:web-services.CallImporter\">

<dataProvider>mycarcasino.com</dataProvider>

<username>mycarcasino.com</username>

<password>bet5onCC</password>

<xmlDocument>$xml</xmlDocument>

<documentType>Core</documentType>

<batchIdentifier>$BI</batchIdentifier></ImportFile>";

 

// set the URL or path to the WSDL document

$wsdl =
"https://callcommand.com:443/callimporter/CallImporter.asmx?WSDL";

//$wsdl = "http://www.callcommand.com:8085/CallImporter8080.wsdl";

 

// instantiate the SOAP client object

$soap = new soapclient($wsdl,"wsdl");

// get the SOAP proxy object, which allows you to call the methods
directly

$proxy = $soap->getProxy();

 

// get the result, a native PHP type, such as an array or string

$result = $proxy->ImportFile($parameters);

 

// Get the response

$theXML= $proxy->response;

// To see the response, uncomment the following lines

//echo '<xmp>'.$theXML.'</xmp>';

if ($result['faultstring'])

{

?>

    <h2>Error</h2>

    <? echo $result['faultstring'];?>

<?

}

else

{

?>

   <? echo "IT WORKED!!";

}

 

?>

 

Any help would be much appreciated.

Thanks,

Jane Ortiz

  

 

 

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

image001.jpg image002.gif image003.gif
Received on 2003-04-28