Recent images block (external) + number of items

your_friend_jack

Joined: 2005-04-16
Posts: 11
Posted: Sun, 2007-04-29 17:35

Hi,

I'm trying to display the 20 latest images on another website.

I'm using the code provided in the documentation:

<?php
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://www.example.com/gallery/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
echo $file_contents;
?>

I replaced g2_blocks=randomImage with g2_blocks=recentImage. It gives me indeed the recent image.

But what should I add to get the latest 20 images?

Many thanks for your help.

 
your_friend_jack

Joined: 2005-04-16
Posts: 11
Posted: Sun, 2007-04-29 17:48

Ok. I've just found the answer in this thread.