If you need some PHP classes to generate Google Sitemap XML, you come to the right page.
/** comment */
function display() {
$vOutput = ‘‘;
$vOutput .= ‘
foreach ($this->mURLs AS $vOne) {
$vOutput .= $vOne->display();
} // rof
$vOutput .= ‘
return $vOutput;
}
}
?>
CGoogleSiteMapURL is the support class for CGoogleSiteMapBase
/** comment */
function display() {
$vURL = str_replace(‘&’,’&’,$this->mURL);
$vOutput = ‘
if (!is_null($this->mModified)) {
$vOutput .= ‘
} // fi
if (!is_null($this->mFreq)) {
$vOutput .= ‘
} // fi
if (!is_null($this->mPriority)) {
$vOutput .= ‘
} // fi
$vOutput .= ‘
return $vOutput;
}
}
?>
Sample Usage: init the class and add URLs to the base class and call display to generate the XML.
Leave a Reply