Thu 20 Nov 2008
Craigslist is an interesting marketplace and is a bit behind the times technology wise. Many people enjoy the simple interface and easy to understand style, however if you try to use craigslist for more than your local area you might encounter a huge time expense. Craigslist helper which is on google search has a nice little feature to help you search multiple places at once.
I decided it couldn’t be all that hard to do this especially considering craiglist’s incredible rss search ability. So with the download of magpierss to do the rss parsing it was really just a matter of bring it together.
With out further ado, craigslist job query
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <?php require_once('rss_fetch.inc'); //magierss $subdomains = array('atlanta','austin','boston','chicago','dallas' ,'denver','houston','lasvegas','losangeles','miami','minneapolis', 'newyork','philadelphia','phoenix','portland','raliegh','sacramento', 'sandiego','seattle','sfbay','washingtondc'); $query = 'fudge'; // your query here foreach($subdomains as $skey=>$subdomain){ $url="http://$subdomain.craigslist.org/search/jjj?query=$query&format=rss"; $rss = fetch_rss( $url ); echo "<h2>$subdomain : " . $rss->channel['title'] . "</h2>"; echo "<ul>"; foreach ($rss->items as $item) { $href = $item['link']; $title = $item['title']; $desc = $item['description']; echo "<li><a href=$href>$title</a><p>$desc</p></li>"; } echo "</ul>"; } ?> |
We shall neither fail nor falter; we shall not weaken or tire…give us the tools and we will finish the job.
Winston Churchhill