PHP code example of sharpapi / php-resume-parser
1. Go to this page and download the library: Download sharpapi/php-resume-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sharpapi / php-resume-parser example snippets
harpAPI\ResumeParser\ResumeParserClient;
use GuzzleHttp\Exception\GuzzleException;
$resumePath = __DIR__ . '/resume.pdf'; // make sure this file exists
$language = 'English';
$client = new ResumeParserClient(apiKey: 'your_api_key_here');
try {
// submit parsing job
$statusUrl = $client->parseResume(
$resumePath,
$language // optional – English is default
);
// Optional: adjust polling settings
$client->setApiJobStatusPollingInterval(10); // seconds
$client->setApiJobStatusPollingWait(180); // seconds total wait
// fetch results when ready
$result = $client->fetchResults($statusUrl)->toArray();
print_r($result);
} catch (GuzzleException $e) {
// Handle SharpAPI or network errors
echo $e->getMessage();
}
bash
composer