|
I wrote a PHP script that calls the URL API's update_candidate through cURL to set some custom fields that I defined (extra_fieldXXXXX, where XXXXX are the appropriate field identifiers that I've already gathered).
I've submitted the values for these fields several ways (plain text, urlencode, htmlspecialchars), and from what I can tell, the API is not decoding the field values properly from the URL. When the extra fields are viewed in CATSONE, I see values like:
I+like+to+watch+turtles (The plus signs remain when spaces should be substituted)
http%3A%2F%2Fwww.linkedin.com%2Fin%2Falfredjones (hex isn't turned back into ASCII characters)
Note that when I submit the candidate via an add_candidate call, the standard CATSONE fields are handled just fine. For example, the candidate's address field shows actual spaces, and not plus signs.
Here's a snippet of my code:
curl_setopt($ch, CURLOPT_URL, 'http://blahblah.catsone.com/api/update_candidate');
curl_setopt ($ch, CURLOPT_POST, 1);
$post_fields = "transaction_code=".$transactionID; // the variables below are defined above - not important.
$post_fields .="&id=".$candidateID;
$post_fields .="&".$edufield."=".($edu); // also tried urlencode($edu), htmlspecialchars($edu)
$post_fields .="&".$linkedinfield."=".($linkedin);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_exec ($ch);
Thanks for any help.
Matt |