} // set the object $OBJ_linkedin = new LinkedIn($API_CONFIG); $OBJ_linkedin->setTokenAccess($_SESSION['oauth']['linkedin']['access']); // proceed flag $proceed = TRUE; // passed data if (!empty($_POST['jxml'])) { $xml = str_replace('<', '<', str_replace('>', '>', $_POST['jxml'])); } else { echo "Missing required data for \$_POST['jxml']"; $proceed = FALSE; } // post job if ($proceed) { $response = $OBJ_linkedin->postJob($xml); if ($response['success'] === TRUE) { // job posted header('Location: ' . $_SERVER['PHP_SELF']); } else { // an error occured echo "Error posting job:<br /><br />RESPONSE:<br /><br /><pre>" . print_r($response, TRUE) . "</pre><br /><br />LINKEDIN OBJ:<br /><br /><pre>" . print_r($OBJ_linkedin, TRUE) . "</pre>"; } } break; case 'renew_job': /** * Handle job renewal requests. */ // check the session if (!oauth_session_exists()) {