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.
Posts: 11
Ok. I've just found the answer in this thread.