Zoomdweebie

Topic: XML Feed?

Just checking here before I post to Feature Requests...

Is there a way to get an XML feed of jobs posted.  I'm thinking of trying to get our jobs listed on sites like Indeed.com.

Zoomdweebie

Re: XML Feed?

Any help on this guys?

Zoomdweebie

Re: XML Feed?

Still hoping for an answer...

links

Re: XML Feed?

Hi,

I don't know if I understood exactly what you need, but try:
http://www.yoursite.com/api/api.php?act … sponse=xml

Hope this helps you!

Zoomdweebie

Re: XML Feed?

I don't know if that was a legitimate url at some point or not, but now it looks like you're just spamming us.

Can anyone help me with this?

links

Re: XML Feed?

I was refering to the fact that

Code:
www.yoursite.com/api/api.php?action=getJobs
&type=0&category=0&count=5&random=1&days_behind=10&response=xml

is your  link to the xml, if you replace 'www.yoursite.com' with your domain link.

Zoomdweebie

Re: XML Feed?

Okay.  Sorry, now I get it.

So, is there a way to pull up our site with all of the jobs listed together with complete descriptions so I can plug that into the link?  When I put our domain name into that link, I only get a few titles:

http://www.hippodocs.com/api/api.php?ac … sponse=xml

links

Re: XML Feed?

Hi,

Try adding in _includes/class.Api.php, on line 105, the following code:
$textile = new Textile();

and then, in the same file, a few lines below, after the line
$response .= '<title><![CDATA[' . $job['title'] . ' la ' . $job['company'] . ']]></title>';

add

$response .= '<description><![CDATA[' . $textile->textileThis($job['description']) .  ']]></description>';

Zoomdweebie

Re: XML Feed?

Okay, so I tried that, and modified the url so it would include more than five results, and I came up with this:

http://www.hippodocs.com/api/api.php?ac … sponse=xml

I submitted it to Indeed.com, and they emailed me back with a link to their XML requirements.  Is there any way to modify this page to meet these requirements:

Example XML feed

<?xml version="1.0"?>
<source>
<publisher>Super X Job Site</publisher>
<publisherurl>http://www.superxjobsite.com</publisherurl>
<lastBuildDate>Fri, 10 Dec 2004 22:49:39 GMT</lastBuildDate>
<job>
<title><![CDATA[Sales Executive]]></title>
<date><![CDATA[Fri, 10 Dec 2005 22:49:39 GMT]]></date>
<referencenumber><![CDATA[unique123131]]></referencenumber>
<url><![CDATA[http://www.superxjobsite.com/viewjob.cfm?jobid=unique123131]]></url>
<company><![CDATA[Big ABC Corporation]]></company>
<city><![CDATA[Phoenix]]></city>
<state><![CDATA[AZ]]></state>
<country><![CDATA[US]]></country>
<postalcode><![CDATA[85003]]></postalcode>
<description><![CDATA[Do you have 1-3 years of sales experience? Are you relentless at closing the deal? Are you ready for an exciting and high-speed career in sales? If so, we want to hear from you!

[...]

We provide competitive compensation, including stock options and a full benefit plan. As a fast-growing business, we offer excellent opportunities for exciting and challenging work. As our company continues to grow, you can expect unlimited career advancement! ]]></description>
<salary><![CDATA[$50K per year]]></salary>
<education><![CDATA[Bachelors]]></education>
<jobtype><![CDATA[fulltime, parttime]]></jobtype>
<category><![CDATA[Category1, Category2, CategoryN]]></category>
<experience><![CDATA[5+ years]]></experience>
</job>
[...]
</source>

View complete example XML feed

Requirements

    * All job content must be inside CDATA sections to avoid issues processing your XML feed
    * Feeds must provide all currently open jobs, not jobs added since the last feed request. Jobs not included in your feed will be removed from our search results. We support delta feeds, which allows us to update your jobs more frequently (4x / day or more) but is more difficult to implement. Please contact us if interested.
    * The date provided for each job should indicate when the job was first published.
    * The referencenumber provided for each job must be unique to that job.

Acceptable Use Policies
Your feed will be disabled and your jobs will be removed from our search results without notice if you do not adhere to the following:

    * URLs you provide must be permanent links directly to the job description. You must NOT require the user to log in to view the job description (you may require a user log in to apply for a job).
    * All jobs provided in your XML feed must be unique to your website. You must NOT include jobs from other job boards in your XML feed.
    * You must NOT include expired or closed jobs in your XML feed

If your feed is disabled you will need to contact us to reactive it.

Feed Updates & Delivery

    * We will check your feed once a day for new jobs.
    * You can provide your feed via password protected HTTP or FTP sites.
    * You are encouraged to zip or gzip your feed.

kelsojohn10

Re: XML Feed?

Hey

This is my first post so please be nice smile lol

I've just started using this script a few days ago and this code I've done might be able to help with this problem.

Open app/_includes/class.Api.php

Change this whole code (// Return result as XML) from about line 102

Code:

    // Return result as XML
    public function ReturnXml()
    {
        $response = '<?xml version="1.0" encoding="utf-8"?>';
        $response .= '<jobs>';
        foreach ($this->mJobs as $job)
        {
            $response .= '<job>';
            $response .= '<title><![CDATA[' . $job['title'] . ' la ' . $job['company'] . ']]></title>';
            $response .= '<url>' . JOBBER_URL . 'job/' . $job['id'] . '/' . $job['url_title'] . '/</url>';
            $response .= '<date>' . $job['created_on'] . '</date>';
            $response .= '</job>';
        }
        $response .= '</jobs>';
        return $response;
    }

to this

Code:

    // Return result as XML
    public function ReturnXml()
    {
        $textile = new Textile();
        $response = '<?xml version="1.0" encoding="utf-8"?>';
        $response .= '<source>';
        $response .= '<publisher>YOUR SITE NAME</publisher>';
        $response .= '<publisherurl>http://www.YOUR URL.COM</publisherurl>';
        $response .= '<jobs>';
        foreach ($this->mJobs as $job)
        {
            $response .= '<job>';
            $response .= '<title><![CDATA[' . $job['title'] . ' la ' . $job['company'] . ']]></title>';
            $response .= '<url><![CDATA[' . JOBBER_URL . 'job/' . $job['id'] . '/' . $job['url_title'] . '/]]></url>';
            $response .= '<date><![CDATA[' . $job['created_on'] . ']]></date>';
            $response .= '<description><![CDATA[' . $textile->textileThis($job['description']) .  ']]></description>';
            $response .= '<referencenumber><![CDATA[' . $job['url_title'] . ']]></referencenumber>';
            $response .= '<country><![CDATA[UK]]></country>';
            $response .= '</job>';
        }
        $response .= '</jobs>';
        $response .= '</source>';
        return $response;
    }

You will need to change a few things like your URL and site name and the country.

When you have uploaded the updated code try your domain using this http://www.YOURURL.com/api/api.php?acti … sponse=xml

code:
api/api.php?action=getJobs&type=0&category=0&count=5000&random=1&days_behind=1000&response=xml

Hope this help smile

Thanks