Hi,
I am creating a candidate form in my website and posting the values to Zoho recruit using addRecords API & PHP, am able to add a records when using .txt as resume files. When trying the same with ms-word/PDF its not working/Uploading.
Is there a way to Upload word/PDF files using PHP & Addrecords API, posting the my code as well
$xmlDate = '<Candidates>
<row no="1">
<FL val="First Name">Test Name</FL>
<FL val="Last Name">Namen</FL>
<FL val="Previous Names">Tester Names</FL>
<FL val="Date of Birth">11-11-1982</FL>
<FL val="Contact address">my home</FL>
<FL val="Phone (H)">44987654</FL>
<FL val="Phone (M)">44987654</FL>
<FL val="Email ID">test@test.com</FL>
<FL val="Highest qualification held">B Ed</FL>
<FL val="Teacher reference number">tech-007</FL>
<FL val="Total work exp (year)">5</FL>
<FL val="Total work exp (month)">5</FL>
<FL val="Current job title">Other</FL>
<FL val="Most Recent Employer">some guy</FL>
<FL val="Skill set">Java</FL>
<FL val="Additional Information">Not Additional Information</FL>
<FL val="Attach resume"> '.base64_encode(file_get_contents('http://sitename/test.doc')).'</FL>
<FL val="Attach resume_filename">test.doc'</FL>
</row>
</Candidates>';
$ch = curl_init('https://recruit.zoho.com/ats/private/xml/Candidates/addRecords');
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);/
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$authtoken = "AUTHTOKEN";
$query = "authtoken=".$authtoken."&scope=recruitapi&xmlData={$xmlDate}";
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);// Set the request as a POST FIELD for curl.
$response = curl_exec($ch);
print_r($response);
curl_close($ch);