Hi.
I want to show random pictures from coppermine on another webb page.
I want to show s specifik category.
First of all, i'm not sure if i should call
cfrssget.php or rss_lastadded.php.
this is my simple code..
$url = "http://....../cpmfetch/cfrssget.php";
$rss = fetch_rss($url);
foreach ($rss->items as $item ) {
echo "".$item['description']."<br /><br />";
}
anyone have a sollution? ???
Knugen of Stockholm
I would use php include...
code to use with cpg and cpmfetch:
<?php
include $_SERVER['DOCUMENT_ROOT'].'/WEBSITE#1/cpmfetch/cpmfetch.php';
$objCpm = new cpm("./pics/cpmfetch/cpmfetch_config.php");
$options = array("subtitle" => "%f","imagesize" => "thumb","windowtarget" => '_blank');
$objCpm->cpm_viewRandomMedia(1,3,$options);
$objCpm->cpm_close();
?>
save that code as random.php in the same directory as cpg...and then use the php include to include that page onto the page on your other website:
<?php
include 'http://www.WEBSITE#1.com/random.php';
?>
keep the peace,
freesouljah
oh yeah...to get it from a category, you need to use this as your $objCpm:
$objCpm->cpm_viewRandomMediaFrom("cat=XXX",1,3,$options);
and XXX should be replaced by the category number you want to use...
keep the peace,
freesouljah