You can request multiple photos for a single property at once, and you can request multiple photos for multiple properties at once. All said, it ends up roughly at the same bandwidth consumption but it cuts down on the round-trip requests needed to finish.
I posted a piece of code on the new PHRETS site (
http://troda.com/projects/phrets/index.php?title=Create_batch_list ) but haven't gone back through to show how that can be used. In short, the main way I use it is to make an array of the listings I need to grab photos for. So, I end up with an array with a few hundred (or thousand) items, each of which is a single property number.
Normally:
// $list_to_get is the array of single numbers
foreach ($list_to_get as $num) {
$photos = $rets->GetObject("Property", "Photo", $num);
foreach ($photos as $photo) {
// save the photo here
}
}
Using that function:
// $list_to_get is the array of single numbers
$batches = create_batch_list($list_to_get, 5);
foreach ($batches as $batch) {
$photos = $rets->GetObject("Property", "Photo", $batch);
foreach ($photos as $photo) {
// save the photo here