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 6780329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:29:35+00:00 2026-05-26T16:29:35+00:00

This deals with exchanging data between two web services. I’m stumped as to where

  • 0

This deals with exchanging data between two web services.

I’m stumped as to where to even start. Any assistance, pointers, or even complete solutions 🙂 much appreciated.

I’ll describe in plain language…

SurveyGizmo can post (insert) data to ZohoCRM.

After insert, Zoho responds with either an xml response that includes an ID of the inserted record.

Gizmo needs that ID for subsequent updates.

The problem is, Gizmo will only accept a response in a simple “key1=value1,key2=value2” format.

I’d like to have a php script on my server (or ZohoCreator deluge script) receive Gizmo’s post, pass it through to ZohoCRM, receive the xml response from Zoho, convert it to key=value, and return it to Gizmo.

This is what Gizmo posts to ZohoCRM:

https://crm.zoho.com/crm/private/xml/Cases/insertRecords?newFormat=2&apikey=KEYGOESHERE&ticket=TICKETGOESHERE&duplicateCheck=2&xmlData=
<Cases>
<row no="1">
<FL val="WHOID">contactidrelatedtocasebeinginserted</FL>
<FL val="Subject">mysubject</FL>
<FL val="Project">myproject</FL>
<FL val="Case Owner">myemail</FL>
</row>
</Cases>

This is what Zoho CRM responds after insert:

(the 00000 from Id is what I need to return to Gizmo as “Id=000000”):

<response uri="/crm/private/xml/Cases/insertRecords">
<result>
<message>Record(s) inserted successfully</message>
<recorddetail>
<FL val="Id">00000</FL>
<FL val="Created Time">2011-11-03 20:14:44</FL>
<FL val="Modified Time">2011-11-03 21:34:39</FL>
<FL val="Created By">
<![CDATA[ Bamboo ]]>
</FL>
<FL val="Modified By">
<![CDATA[ Bamboo ]]>
</FL>
</recorddetail>
</result>
</response>

Thank you so much.

Below is a script I’ve been using elsewhere. I’m just not sure where to put the xml parser to echo the ID response back to the posting url.

////
/////note: the whole point of the script was to fix the hyphen to underscore in smtp-id so zoho would accept sendgrid
////
 define('POSTURL', 'https://creator.zoho.com/api/xml/USERNAME/test/add/');
 define('POSTVARS', '');  // POST VARIABLES TO BE SENT
 // INITIALIZE ALL VARS
 $event='';
 $email='';
 $response='';
 $attempt='';
 $url='';
 $status='';
 $reason='';
 $type='';
 $category='';
 $zoho_email_id='';
 $smtp_id='';
 $timestamp='';
 $ch='';
 $Rec_Data='';
 $Temp_Output='';

 if($_SERVER['REQUEST_METHOD']==='POST') {  // REQUIRE POST OR DIE
 if(isset($_POST['event'])) $event=$_POST['event'];  // GET event INTO VAR 
 if(isset($_POST['email'])) $email=$_POST['email'];  // GET email INTO VAR 
 if(isset($_POST['response'])) $response=$_POST['response'];  // GET response INTO VAR 
 if(isset($_POST['attempt'])) $attempt=$_POST['attempt'];  // GET attempt INTO VAR 
 if(isset($_POST['url'])) $url=$_POST['url'];  // GET url INTO VAR 
 if(isset($_POST['status'])) $status=$_POST['status'];  // GET status INTO VAR 
 if(isset($_POST['reason'])) $reason=$_POST['reason'];  // GET reason INTO VAR 
 if(isset($_POST['type'])) $type=$_POST['type'];  // GET type INTO VAR 
 if(isset($_POST['category'])) $category=$_POST['category'];  // GET category INTO VAR 
 if(isset($_POST['zoho_email_id'])) $zoho_email_id=$_POST['zoho_email_id'];  // GET zoho_email_id INTO VAR 
 if(isset($_POST['smtp-id'])) $smtp_id=$_POST['smtp-id'];  // GET smtp-id INTO VAR 
 if(isset($_POST['timestamp'])) $timestamp=$_POST['timestamp'];  // GET timestamp INTO VAR 

 $ch = curl_init(POSTURL);
 curl_setopt($ch, CURLOPT_POST      ,1);
 curl_setopt($ch, CURLOPT_POSTFIELDS    ,'apikey=APIKEY&zc_ownername=USERNAME&event='.$event.'&email='.$email.'&response='.$response.'&attempt='.$attempt.'&url='.$url.'&status='.$status.'&reason='.$reason.'&type='.$type.'&category='.$category.'&zoho_email_id='.$zoho_email_id.'&smtp_id='.$smtp_id.'&timestamp='.$timestamp);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION  ,1); 
 curl_setopt($ch, CURLOPT_HEADER      ,0);  // DO NOT RETURN HTTP HEADERS 
 curl_setopt($ch, CURLOPT_RETURNTRANSFER  ,1);  // RETURN THE CONTENTS OF THE CALL
 $Rec_Data = curl_exec($ch);

 ob_start();
 header("Content-Type: text/html");
 $Temp_Output = ltrim(rtrim(trim(strip_tags(trim(preg_replace ( "/\s\s+/" , " " , html_entity_decode($Rec_Data)))),"\n\t\r\h\v\0 ")), "%20");
 $Temp_Output = ereg_replace (' +', ' ', trim($Temp_Output));
 $Temp_Output = ereg_replace("[\r\t\n]","",$Temp_Output);
 $Temp_Output = substr($Temp_Output,307,200);
 echo $Temp_Output;
 $Final_Out=ob_get_clean();
 echo $Final_Out;  
 curl_close($ch);
} else die('Blah! That didn't work!');

exit;
  • 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-26T16:29:36+00:00Added an answer on May 26, 2026 at 4:29 pm

    Use simplexml in php to read and parse the xml. If you just need to retrieve the Id, you can do as simple as:

    $xml = simplexml_load_string($xml_string);          
    $response = 'Id='.$xml->result->recorddetail->FL;
    

    You can traverse though the whole XML structure. I’d suggest you read the documentaion: http://www.php.net/manual/en/book.simplexml.php

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

Sidebar

Related Questions

This deals with WordPress plugin development. Even if a user has not actually signed
This question deals mainly with streams in web application in .net. In my webapplication
This question deals with concurrency issues, for suggestions on how to display a busy
I know this SO question, but it deals with the subject in more general
This is not a big deal, but is there any way in F# to
This deals with the (diverse) flash viewers that let you zoom in on images
This problem actually deals with roll-overs, I'll just generalized below as such: I have
This question deals with optional arguments passed to a Ruby block. I'm wondering if
I know this issue deals with IE browsers failing to display PNG files, especially
I just ran into this one and couldn't seem to get any clear answer

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.