<?php use IndeedJobs\Provider; require_once __DIR__ . '/../vendor/autoload.php'; include_once "templates/base.php"; echo pageHeader("Simple Job Search Example"); // Set up client with configuration $config = (include __DIR__ . '/../config.php'); try { $client = Provider::createClient($config); } catch (Exception $e) { echo "<pre>"; print_r($e); echo "</pre>"; } // If the client was created, proceed to get job listings if (isset($client)) { $client->setQuery('engineering'); $collection = $client->getJobs(); if ($collection && !$collection->getErrors()) { echo "<h3>Attributes: </h3><pre>"; print_r($collection->getAttributes()); echo "</pre>"; echo "<h3>Jobs: </h3>"; foreach ($collection->all() as $job) { echo "<h4>Job: </h4><pre>"; print_r($job); echo "</pre>"; } } elseif ($collection && $collection->getErrors()) { echo "<pre>";