Hi! Have you already solved this? It's pretty easy to figure out if
you use the documentation at developer.oodle.com, but I made you a
little demo page you can see at crashjoplin.com/xml/oodledemo.php
which will show you only 30 listings with pictures from that date.
Here's the code to produce those results:
<?php
// calls the oodle class available from Oodle
include("oodle_api_php5.php");
//set number of pics to show
$showlimit=30;
//set a number to check. This is higher than
//what we want to show to accommodate for
//listings without pictures. Because we'll
//be ignoring them for this
$startrecord='0';
$endrecord='200';
//Set your date you want to check
$startdate=strtotime('Feb 28 2008');
$enddate=strtotime('Feb 29 2008');
//*************** Settings - Customize them to fit your needs!
$filters['partner_id'] = 'getcherown';
$filters['region'] = 'usa';
// a blank category means "all"
$filters['category']='';
$filters['from'] = $startrecord;
$filters['to'] = $endrecord;
//filter by the dates above
$filters['filters'][] =
array('type'=>'create_time','params'=>array('low' => $startdate,'high'
=> $enddate));
$oodleApi = new OodleApi();
$response=$oodleApi->make_request('get',$filters);
//this loop sorts
//through the results and only shows those with
//pictures, and limits the number shown to 30...of course you can
//change this however you like...
$piccount=0;
foreach ($response['items'] as $key=>$ad) {
$picprinted=false;
foreach($ad as $key=>$val) {
if (($ad['thumb'])and ($ad['create_time']=$startdate) and
(!$picprinted) and ($piccount<$showlimit)) {
echo '<img src="'.$ad['thumb'].'" title="created on:'.date("M d,
Y",$ad['create_time']).'"/>';
echo '<br>';
$picprinted=true;
$piccount++;
}
}
}
?>
Make sense? Sure! You can run your mouse over the picture to see the
date the listing was created. Hope that helps.
--- In oodleapi@yahoogroups.com, "ssoorton" <ssoorton@...> wrote:
>
> I am trying to gather records by date and also a set number returned.
> Can anyone provide some sample code of how to gather all ads for
> 02-28-08 and limit to 20 or 30.
>
> Any help appreciated in advance
>