Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6744967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:08:51+00:00 2026-05-26T12:08:51+00:00

Looking for a ColdFusion version of the following PHP API wrapper for CapsuleCRM: <?php

  • 0

Looking for a ColdFusion version of the following PHP API wrapper for CapsuleCRM:

<?php
// The data you want to send to Capsule CRM in xml format 
// SEE http://capsulecrm.com/help/page/javelin_api_party

I’m understanding that this variable contains the XML string…

$myxml="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n
<person>\n
<title>Mr</title>\n
<firstName>Test12</firstName>\n
<lastName>Tester12</lastName>\n
<jobTitle>Chairman</jobTitle>\n
<organisationName>Big Company</organisationName>\n
<about>Testing</about>\n
</person>";

// The URL to connect with (note the /api/ that's needed and note it's person rather than party) 
// SEE: http://capsulecrm.com/help/page/api_gettingstarted/
$capsulepage =  'https://sample.capsulecrm.com/api/person';

However, I don’t know how to initiate cURL in ColdFusion.

// Initialise the session and return a cURL handle to pass to other cURL functions.
$ch = curl_init($capsulepage);

What does the ‘curl_setopt_array’ function do exactly? Is there a CF equivalent?

// 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);
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:08:51+00:00Added an answer on May 26, 2026 at 12:08 pm

    I could be wrong, but that looks like a basic http post. The equivalent in CF is cfhttp. To pass parameters/headers (ie curl_setopt_array) use cfhttpparam.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for C# class which wraps calls to do the following: read and write
Looking for a function like this in ColdFusion, allowing me to show dates as
I'm looking into using Jquery to replace some of our native Coldfusion ajax functionality.
I've been looking all over the web for a ColdFusion-based SQL administration tool for
I've been looking recently at Coldfusion for an upcoming job. My background is in
I am looking for dark themes for Coldfusion Builder but google does not find
I'm currently looking at a terrible legacy ColdFusion app written with very few stored
I'm looking for a complete list of tags that are not available in ColdFusion
I'm a ColdFusion developer looking to break into Flex. I have a couple test
I’m looking for a nudge in the right direction! I have a ColdFusion page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.