// Don't bother to check because if Twitter fails, it doesn't matter. //$resultArray = curl_getinfo($curl); //if ($resultArray['http_code'] != 200) { // echo 'ko'; //} curl_close($curl); } echo 'ok'; exit; } if ($_POST['action'] == 'extend_job') { $employer = new Employer($_POST['employer']); // check whether employer can use free job posting? if ($employer->hasFreeJobPostings() === false) { // check whether employer has paid job postings? if ($employer->hasPaidJobPostings() === false) { // check whether subscription has expired $result = $employer->getSubscriptionsDetails(); if ($result[0]['expired'] < 0 || $result[0]['subscription_suspended'] != '0') { echo '-2'; exit; } } else { $employer->usedPaidJobPosting(); } } else { $employer->usedFreeJobPosting(); } $job = new Job($_POST['id']); if ($job->extend() === false) { echo 'ko';