Quote Originally Posted by RAMMSTEIN View Post
This is google sitemap for vshre 2.7

Include channels, videos and tags works only in v2.7

Just copy this code and save it as sitemap.php at you vshare files.

Code:
<?php
header("content-type:text/xml;charset=utf-8");
echo "<?xml version='1.0' encoding='UTF-8'?>";
require 'include/config.php';
$url = VSHARE_URL;
echo "
<urlset xmlns='http://www.google.com/schemas/sitemap/0.84'>
<url>
  <loc>$url/</loc>
    <priority>1.0</priority>
    <changefreq>hourly</changefreq>
  </url>
  <url>
    <loc>$url/recent/</loc>
    <priority>0.9</priority>
 
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/recent/2</loc>
    <priority>0.8</priority>
    <changefreq>daily</changefreq>
  </url>
 
  <url>
    <loc>$url/recent/3</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/recent/4</loc>
 
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/recent/5</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/recent/6</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
 
    <loc>$url/recent/7</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/recent/8</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/recent/9</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/channels/</loc>
    <priority>0.9</priority>
    <changefreq>weekly</changefreq>
  </url>
  <url>
    <loc>$url/favorites/</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/featured/</loc>
    <priority>0.8</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/random/</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>
  <url>
    <loc>$url/rated/</loc>
    <priority>0.7</priority>
    <changefreq>daily</changefreq>
  </url>";
 
# channels
$sql = "SELECT channel_id, channel_name FROM `channels`
                ORDER BY `channel_sort_order` ASC";
$res = mysql_query($sql,$conn)
or die( "Error: " . mysql_error() );
while ($info = mysql_fetch_row($res)) {
$SefUrl=strtolower(preg_replace("/[^a-zA-Z0-9]+/","-", $info[1]));
srand ((double) microtime( )*1000000);
$random_number = rand(6,7);
 
echo "
<url>
<loc>$url/channel/".$info[0]."/".$SefUrl."/</loc>";
echo "
<changefreq>monthly</changefreq>";
echo "
<priority>0.$random_number</priority>";
echo "
</url>";
}
 
# videos
$sql = "SELECT video_id, video_title, video_add_date FROM `videos` WHERE
           `video_active`='1' AND
           `video_approve`='1' AND
           `video_type`='public'
            ORDER BY `video_id` DESC";
$res = mysql_query($sql,$conn)
or die( "Error: " . mysql_error() );
while ($info = mysql_fetch_row($res)) {
$SefUrl=strtolower(preg_replace("/[^a-zA-Z0-9]+/","-", $info[1]));
srand ((double) microtime( )*1000000);
$random_number = rand(4,6);
 
echo "
<url>
<loc>$url/view/".$info[0]."/".$SefUrl."/</loc>";
echo "
<lastmod>".$info[2]."</lastmod>
<changefreq>monthly</changefreq>";
echo "
<priority>0.$random_number</priority>";
echo "
</url>";
}
# tags
$sql = "SELECT tag FROM `tags` WHERE
           `active`='1' AND
           `tag_count` > 0
            ORDER BY `tag_count` DESC";
 
$res = mysql_query($sql,$conn)
or die( "Error: " . mysql_error() );
while ($info = mysql_fetch_row($res)) {
$SefUrl=strtolower(preg_replace("/[^a-zA-Z0-9]+/","-", $info[0]));
srand ((double) microtime( )*1000000);
$random_number = rand(1,4);
 
echo "
<url>
<loc>$url/tag/".$SefUrl."/</loc>";
echo "
<changefreq>monthly</changefreq>";
echo "
<priority>0.$random_number</priority>";
echo "
</url>";
}
 
mysql_close($conn);
echo "
</urlset>";
?>
UPDATED AND WORKING
I just uploaded this code to my vshare folder and try to check if it is working and found there is not xml links but giving me millions of codes with links and bla bla how to fix it? please help me. i tried like this http://www.clonevideos.com/sitemap.php