Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
capsucleCRM API ColdFusion包装器_Api_Coldfusion_Wrapper - Fatal编程技术网

capsucleCRM API ColdFusion包装器

capsucleCRM API ColdFusion包装器,api,coldfusion,wrapper,Api,Coldfusion,Wrapper,正在寻找用于CapsucleCRM的以下PHP API包装的ColdFusion版本: <?php // The data you want to send to Capsule CRM in xml format // SEE http://capsulecrm.com/help/page/javelin_api_party “curl\u setopt\u array”函数的具体功能是什么?是否有CF等价物 // set appropriate options NB these a

正在寻找用于CapsucleCRM的以下PHP API包装的ColdFusion版本:

<?php
// The data you want to send to Capsule CRM in xml format 
// SEE http://capsulecrm.com/help/page/javelin_api_party
“curl\u setopt\u array”函数的具体功能是什么?是否有CF等价物

// set appropriate options NB these are the minimum necessary to achieve a post with a useful response
// ...can and should add more in a real application such as 
// timeout CURLOPT_CONNECTTIMEOUT 
// and useragent CURLOPT_USERAGENT
// replace 1234567890123456789 with your own API token from your user preferences page
$options = array(CURLOPT_USERPWD => '1234567890123456789:x',
        CURLOPT_HTTPHEADER => array('Content-Type: text/xml'),
        CURLOPT_HEADER => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => $myxml
            );
curl_setopt_array($ch, $options); 

// Do the POST and collect the response for future printing etc then close the session
$response = curl_exec($ch);
$responseInfo = curl_getinfo($ch);
curl_close($ch);
?>

我可能错了,但这看起来像是一个基本的http帖子。CF中的等效项为。要传递参数/头(即
curl\u setopt\u array
),请使用

我可能错了,但这看起来像是一个基本的http帖子。CF中的等价物是
cfhttp
。要传递参数/头,请参见
cfhttpparam
// Initialise the session and return a cURL handle to pass to other cURL functions.
$ch = curl_init($capsulepage);
// set appropriate options NB these are the minimum necessary to achieve a post with a useful response
// ...can and should add more in a real application such as 
// timeout CURLOPT_CONNECTTIMEOUT 
// and useragent CURLOPT_USERAGENT
// replace 1234567890123456789 with your own API token from your user preferences page
$options = array(CURLOPT_USERPWD => '1234567890123456789:x',
        CURLOPT_HTTPHEADER => array('Content-Type: text/xml'),
        CURLOPT_HEADER => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => $myxml
            );
curl_setopt_array($ch, $options); 

// Do the POST and collect the response for future printing etc then close the session
$response = curl_exec($ch);
$responseInfo = curl_getinfo($ch);
curl_close($ch);
?>