Hello I have PHPdug site and it uses sitemap.php Now the data has grown to over 100,000 urls. Google accept 50,000 url in one sitemap. Now i need that sitemap.php to be coded some way that after 30,000 urls it redirect to second sitemap.php and then third and so on. or if you have better idea what to do. Need to done this quickly and also let me know you MSN messanger id so we can talk Contact me only. Payment will be via paypal. Thanks Harris
tip for you pass a querystring to the sitemap.php for the page number and each page number can do 50k sitemap.php?pageNumber=1 sitemap.php?pageNumber=2 sitemap.php?pageNumber=3 etc now all you have to do is page ur urles so that it brings back 50k for each page. I ran into a similiar situation for a website i was running before, this solved the problem sorry i dont do php or i would give u the actual code
require_once('includes/config.php'); require_once('includes/functions/func.global.php'); db_connect($config); header( "Content-type: application/xml; charset=\"utf-8\"", true ); header( 'Pragma: no-cache' ); generate_header(); $query = "SELECT story_id,story_time FROM ".$config['db']['pre']."stories"; $query_result = @mysql_query ($query) OR error(mysql_error(), __LINE__, __FILE__, 0, '', ''); while ($info = @mysql_fetch_array($query_result)) { $result="\n"; $result .= "\t<url>\n\t\t<loc>".$config['site_url'].'story.php?id='.$info['story_id']."</loc>\n"; // lastmod $result .= "\t\t<lastmod>".date('Y-m-d',$info['story_time'])."</lastmod>\n"; // changefreq $result .= "\t\t<changefreq>weekly</changefreq>\n"; // priority $result .= "\t\t<priority>0.8</priority>\n"; $result .= "\t</url>"; print $result; } generate_footer(); function generate_header() { $header = "<\x3Fxml version=\"1.0\" encoding=\"utf-8\"\x3F>\n<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\">"; print $header; } function generate_footer() { $footer = "\n</urlset>"; print $footer; } ?> Thanks for any help
Hi, If you r still searching for then u can add me on skype as my id is smokecolors2 or macsmoke .. for your information the code mentioned by addictionair is perfect you can follow that or even after that u face problems then PM me or add me ...thanks.