[addon] Google Sitemap Generator
I have managed to put together a very simple sitemap Generator for a vShare-Powered Web Site.
What it does:
This Script will include in the sitemap all your ACTIVE and APPROVED Videos. (I didn't mind hiding "private" videos at the moment, because I won't be using them)
It has been tested on two Websites (vShare 2.4 Installed) and so far it is working great. Many Videos are being indexed by Search Engines.
You just need to
1) Copy the following lines of code in a new page called "sitemap.php" (or whatever you like).
2) Edit your Database connection details and YOUR SITE NAME in the Code.
3) Then Upload the php page to your Website Root and feed it into Google, Yahoo and so on...
Here's the code for you to grab:
Code:
<?php
echo "<?xml version='1.0' encoding='iso-8859-1'?>";
echo "<urlset xmlns='http://www.google.com/schemas/sitemap/0.84'>";
//BEGIN EDIT - You will need to edit these details to reflect your own configuration
// hostname on which MySQL is (usally localhost)
$dbhost = "localhost";
// Database name
$dbname = "put_your_database_here";
// Username
$dbuser = "put_your_username_here";
// Password
$dbpass = "put_your_password_here";
//END EDIT
// mysql_connect() fnction
$conn = mysql_connect($dbhost,$dbuser,$dbpass)
or die("Unable to connect to MySQL.");
// mysql_select_db() function
mysql_select_db($dbname,$conn)
or die("Unable to connect to Database $dbname");
$sql = "Select VID, title, adddate from video where approve=1 and active=1";
// execute SQL Command
$res = mysql_query($sql,$conn)
or die( "Error: " . mysql_error() );
// Retrieve Results
while ($info = mysql_fetch_row($res)) {
$SefUrl=strtolower(preg_replace("/[^a-zA-Z0-9]+/","-", $info[1]));
//EDIT YOUR SITE NAME
echo "<url><loc>http:/WWW.YOURSITE.COM/view/".$info[0]."/".$SefUrl.
"/</loc><lastmod>".$info[2]."</lastmod><priority>1</priority></url>";
}
echo "</urlset>";
// mysql_close() function
mysql_close($conn);
?>
Re: [addon] Google Sitemap Generator
hi your url code is not working i changed it to my own url but when google lists the urls none of them work and google just comes up with errors it should look like this http://www.worldsexmovietube.net/vie...ing-threesome/ but when google finds the urls they come up like this http://www.worldsexmovietube.net/vie...ing-threesome/ if you notice the /2238/ is not showing up so google counts it as an invalid link
Re: [addon] Google Sitemap Generator
Yes i have those problems. I will fix this when i will have time. :(
Re: [addon] Google Sitemap Generator
Quote:
Originally Posted by worldsex
Chubby mature hoes pusshy shagging threesomes?
That's quite a narrow niche....
Re: [addon] Google Sitemap Generator
:shock:
Would google even actually index that?
Re: [addon] Google Sitemap Generator
Quote:
Originally Posted by grynmoors
Would google even actually index that?
Yes. Google allows for adult sitemaps. You do, however, have to specify that the content is adult (it's one of the tags). Otherwise, it will not take it.