|
URL |
|
registerXPathNamespace( 'sm', "http://www.sitemaps.org/schemas/sitemap/0.9" );
ob_flush( );
flush( );
foreach ( $xmlorg->children( ) as $url ) {
$loc = $url->loc[0];
$lastmodorg = $url->lastmod[0];
$lastmodbak = $xmlbak->xpath( '/sm:urlset/sm:url[sm:loc="' . $loc . '"]/sm:lastmod' );
if ( is_array( $lastmodbak ) ) {
$lastmodbak = implode( '', $lastmodbak );
}
if ( $verbose ) {
if ( $lastmodorg == $lastmodbak ) {
print( "\n" );
} else {
print( "
\n" );
}
print( "\t{$lastmodorg} | \n" );
print( "\t{$loc} | \n" );
print( "\t{$lastmodbak} | \n" );
print( "
\n" );
ob_flush( );
flush( );
} else {
if ( $lastmodorg != $lastmodbak ) {
print( "\n" );
print( "\t{$lastmodorg} | \n" );
print( "\t{$loc} | \n" );
print( "\t{$lastmodbak} | \n" );
print( "
\n" );
ob_flush( );
flush( );
}
}
}
?>