Last Comments

a59k

Joined: 2009-01-21
Posts: 2
Posted: Wed, 2013-01-02 10:56

Hello,

How I can take last comments (ex. last 5 comments) fron gallery2 to other site like images ?

<?php

// Get Random Image - Curl Security rather than @openfile()

$curl_handle = curl_init();
// Where should we get the data?
curl_setopt ($curl_handle, CURLOPT_URL, "user:pass@www.site.net/gallery/main.php?g2_linkTarget=_parent&g2_view=imageblock:External&g2_blocks=randomImage&g2_maxSize=100&g2_show=none");

// Setup the Curl Options.
curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($curl_handle, CURLOPT_CONNECTTIMEOUT, 1);
// Make the call.
$buffer = curl_exec($curl_handle);
// Close Curl
curl_close($curl_handle);

print $buffer

?>

Thank you