<?php
include "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>
How can I do if my gallery photo is in the other server or URL?
Like this website, http://blog.stieglmayer.com/2007-01-07-cpmfetch-widget/
The page you refer to talks about a widget (a hack of cpmFetch). Do as suggested on that page or ask the author of that page for support if you want to use the hack he created.