Skip to content

Embedding the latest 4 jobs on our website #418

Answered by ayrancd
ayrancd asked this question in Q&A
Discussion options

You must be logged in to vote

Just found a solution:

`<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://public-rest30.bullhornstaffing.com/rest-services/1VOIP/query/JobBoardPost?where=(isOpen=true)&fields=id,title,publishedCategory(id,name),address(city,state),employmentType,dateLastPublished,publicDescription,isOpen,isPublic,isDeleted&count=4&orderBy=-dateLastPublished&start=0");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);

curl_close($ch);
$ch = curl_init();

$out = json_decode($output, true);
for($i=0; $i<=count($out); $i++){
    $desc = strip_tags($out["data"][$i]["publicDescription"]);
    $description = strlen($desc) > 100 ? substr($desc,0,100)."..." : $desc;?>
    <div c…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@ayrancd
Comment options

@inTulsa
Comment options

Comment options

You must be logged in to vote
2 replies
@inTulsa
Comment options

@pbearne
Comment options

Answer selected by charlesabarnes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants