PHP - Sitemap Create Large Website Photo Albums With Java Etc
For the last 2 months I have purchased software and utilized free software to attempt to create a sitemap fro my websites
www.negroartist.com
www.africanafrican.com
all of them fail and do not look at all links. i.e. look at a photo album with all the htm in the photo album.
Most of the windows based software do not work and often crash. I want it to index ALL of my site (except images, pdf etc)
Is there any php code, program etc. out there to help me through my dilemna that has instructions for configurabillity? I can also try anything that uses apache etc.
i am at my whits end with this. please help.
has anyone used bing sitemap plugin? how do you install this baby?
my links will total in the hundreds of thousands.
thanks :-)
Similar TutorialsFrom my experience, using Google's sitemap generator to generate a sitemap is not that good. It creates page that you do not want to show up. I am wondering what the best method is for creating a sitemap of a website so that only certain pages of the website show up on Google?
I have a site where I have an admin panel set up to import an XML data feed into a database, but it's a large import and it takes a lot of time to update. I'm looking to upgrade the admin panel and offer the ability to be able to see the number of records as they're being imported instead of it hanging there until the query is completed. The tough part about a progress bar is obviously you have to know the # of items being imported beforehand, and that varies each time the feed is downloaded. So I'm just trying to get some suggestions from someone who may have written something similar. Thanks in advance! Hai i got a site where i take the details of the visitors that enter my office premises. Now what i wanted is to add the photo of the visitor into that. i have a webcam with me through which i can take pictures. I dont have an idea how to do this on the website. I need some one to help me on this.. I dont know really where to start.. Any help would be greately appreciatd.. Wordpress gave me the following error when uploading the this themeforest theme. failed opening '/srv/htdocs/wp-content/themes/QuickFixWebiste(Wordpress)/../../../wp-admin/includes/class-walker-nav-menu-edit.php' for inclusion (include_path='.:/usr/local/php7.2/lib/php') in /srv/htdocs/wp-content/themes/QuickFixWebiste(Wordpress)/library/core/admin/edit-menu-walker.php Can anyone tell me how to resolve this? The source code in the edit-menu-walker.php on lines 1-4 is: <?php if (!class_exists('Walker_Nav_Menu_Edit')){ include_once(get_template_directory() . '/../../../wp-admin/includes/class-walker-nav-menu-edit.php'); }
Hello to all!
Since 2009 my website is online. It's a french dating site. Now i want to make it available in english too.
I wonderring what is the best practice?
should i Create a new domain name and separate english and french OR create my actual website multilingue.
What do you suggest?
Also... for an multilingu website, when a french member register, he will describe himself in french, but if an english member view my site in english and visites a profile of a french member... all will be in english but not the description of the french member...... is it bad or not?
Thanks for your precious help!
Pascal
Hi all, I'm new here (first post) so hopefully you'll all go easy on me I'm created a price comparison website for cameras and lenses. I will have around fifteen retailers on the site. Now I need to scrape each of their websites for the prices - this I can do. However, need a little help and advice on the best way to go about tackling this...is it best to create one big script or have various ones for each retailer, etc? Any help would be appreciated greatly I got a question regarding a news website content that i want to make ! my question is how do i call my contents without using a lot of page? i explain let's say i got 10 news how do i put this 10 news in different pages without using 10 pages ? ex: you can see some links having a number like this http://bbc.uk/news/murder_case-12 then the next page got http://bbc.uk/news/finance-13 the title and the number id change but the page news doesnt change thanks for your answer. I am looking at making a photogallery system for an online community based site. I know that we need to have unique id's , photo names and albums. What i am looking for is: Would it be recommended to create a directory for each user once they are registerd? How would you go about naming and sorting photogralleries? How would you go about naming you photos? How would you do it? I was thinking about a uuid kind of code: ( from php.net) Code: [Select] class UUID { public static function v3($namespace, $name) { if(!self::is_valid($namespace)) return false; // Get hexadecimal components of namespace $nhex = str_replace(array('-','{','}'), '', $namespace); // Binary Value $nstr = ''; // Convert Namespace UUID to bits for($i = 0; $i < strlen($nhex); $i+=2) { $nstr .= chr(hexdec($nhex[$i].$nhex[$i+1])); } // Calculate hash value $hash = md5($nstr . $name); return sprintf('%08s-%04s-%04x-%04x-%12s', // 32 bits for "time_low" substr($hash, 0, 8), // 16 bits for "time_mid" substr($hash, 8, 4), // 16 bits for "time_hi_and_version", // four most significant bits holds version number 3 (hexdec(substr($hash, 12, 4)) & 0x0fff) | 0x3000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one for variant DCE1.1 (hexdec(substr($hash, 16, 4)) & 0x3fff) | 0x8000, // 48 bits for "node" substr($hash, 20, 12) ); } public static function v4() { return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', // 32 bits for "time_low" mt_rand(0, 0xffff), mt_rand(0, 0xffff), // 16 bits for "time_mid" mt_rand(0, 0xffff), // 16 bits for "time_hi_and_version", // four most significant bits holds version number 4 mt_rand(0, 0x0fff) | 0x4000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one for variant DCE1.1 mt_rand(0, 0x3fff) | 0x8000, // 48 bits for "node" mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) ); } public static function v5($namespace, $name) { if(!self::is_valid($namespace)) return false; // Get hexadecimal components of namespace $nhex = str_replace(array('-','{','}'), '', $namespace); // Binary Value $nstr = ''; // Convert Namespace UUID to bits for($i = 0; $i < strlen($nhex); $i+=2) { $nstr .= chr(hexdec($nhex[$i].$nhex[$i+1])); } // Calculate hash value $hash = sha1($nstr . $name); return sprintf('%08s-%04s-%04x-%04x-%12s', // 32 bits for "time_low" substr($hash, 0, 8), // 16 bits for "time_mid" substr($hash, 8, 4), // 16 bits for "time_hi_and_version", // four most significant bits holds version number 5 (hexdec(substr($hash, 12, 4)) & 0x0fff) | 0x5000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one for variant DCE1.1 (hexdec(substr($hash, 16, 4)) & 0x3fff) | 0x8000, // 48 bits for "node" substr($hash, 20, 12) ); } public static function is_valid($uuid) { return preg_match('/^\{?[0-9a-f]{8}\-?[0-9a-f]{4}\-?[0-9a-f]{4}\-?'. '[0-9a-f]{4}\-?[0-9a-f]{12}\}?$/i', $uuid) === 1; } } // Usage // Named-based UUID. $v3uuid = UUID::v3('1546058f-5a25-4334-85ae-e68f2a44bbaf', 'SomeRandomString'); $v5uuid = UUID::v5('1546058f-5a25-4334-85ae-e68f2a44bbaf', 'SomeRandomString'); // Pseudo-random UUID $v4uuid = UUID::v4(); Hi ppl, I am not an php expert, but I want to allow my website users to edit a record in mySQL table. I need to allow them changing Name and description of a product, thats all. easy edit. Is there a ready component that will do the hard work for me? Thank you! err, dunno if i managed to put it in the right thread but if i didn't, please tell me. thank you.
getting back on topic, my father asked me to create a website for a school. i know how to make a website but the problem is, how do i start? should i ask about their objectives or something? color of the webpage etc? in short, i don't know the practicalities and processes used in making a website for a certain client. you could say this would be my first time in doing this (kind of like an on-the-job training) so...any ideas? i would very much appreciate any help given.
Okay so im not that new with PHP but im still learning. So im creating a php website with dreamweaver CS3 and phpmyadmin, which is based on a Music Library. I have a page where you can browse by the artists name. When you click on that it shows you all the artists with that name. But its the next part im having difficulty with. Keeping this as a one page system, i want the artists albums to be displayed when you click on a particular artist. I tried some methods but it doesnt seem to work [Refer to the images from below] Image1 shows the alphabetical list..clicking on any of these takes you to Image 2 which displays all the artists. By clicking on one of these artists i want it to take me to a seperate page which shows all their albums. And by clicking on the albums it shows song names from those particular albums. These song names will then be linked to actual lyrics of the song. There are three tables i have on phpmyadmin which i want the data to be from. These are albums -album_id -artist -album_name -tracklisting -genre -release_date -price -album_image -album_description artists -artist_ID -artist -artist_info -image media -media_id -song_url -video_url -artist -album -song_title -lyrics The ones in bold are the field names id like to be included in the php script. The edition of mhpmyadmin i have doesnt enable linked tables. any help would be greatly appreciatted. Thanks. I'm wanting to make a sitemap for my website but should I includes ALL possible url's? For example I have a search page (where you can search a film) where the url syntax is something like "search.php?type=all&film=a+film". Should I make sure that all possible urls are included in my sitemap e.g all the films in my database? Hope that makes sense. Thanks for any help. Hi. I'm trying to create my first XML sitemap that I am going to be submitting to google. The sitemap is going to be PHP but using MOD rewrite to make it look like an XML file. The site map has been created. http://test.powtest.co.uk/sitemap.xml But, I now want to style it. However, when I add the XML style file, I get an error: Parse error: syntax error, unexpected T_STRING in /home/a/d/adele/web/public_html/sitemap.php on line 1 I'm not to sure how to get my PHP file to read in the XML style file. Any help would be much appreciated PHP sitemap (sitemap.xml) Code: [Select] <?xml-stylesheet type="text/xsl" href="sitemap.xsl"?> <?PHP require_once('includes/initialize.php'); $newAbout = Aboutme::find_by_id(1); $aboutDateMod = $newContact->dateMod; $newContact = Contact_details::find_by_id(1); $contactDateMod = $newContact->dateMod; $lastService = Services::find_last_posted(); $servicesDateMod = $lastService->dateMod; $lastBlog = Blog::find_last_posted(); $blogDateMod = $lastBlog->dateMod; // TOP NAVIGATION echo ' <url> <loc>'.SITE_DOMAIN.DS.'</loc> <lastmod>2011-01-17</lastmod> <changefreq>yearly</changefreq> <priority>0.8</priority> </url> <url> <loc>'.SITE_DOMAIN.DS.'services</loc> <lastmod>'.$servicesDateMod.'</lastmod> <changefreq>daily</changefreq> <priority>0.8</priority> </url> <url> <loc>'.SITE_DOMAIN.DS.'testimonials</loc> <lastmod>2011-01-17</lastmod> <changefreq>daily</changefreq> <priority>0.8</priority> </url> <url> <loc>'.SITE_DOMAIN.DS.'about_adele_fifer</loc> <lastmod>'.$aboutDateMod.'</lastmod> <changefreq>yearly</changefreq> <priority>0.8</priority> </url> <url> <loc>'.SITE_DOMAIN.DS.'contact</loc> <lastmod>'.$contactDateMod.'</lastmod> <changefreq>never</changefreq> <priority>0.8</priority> </url> <url> <loc>'.SITE_DOMAIN.DS.'tips</loc> <lastmod>'.$blogDateMod.'</lastmod> <changefreq>daily</changefreq> <priority>0.8</priority> </url>'; // SERVICE CAT $check = Services::count_CID(); if($check >= 1){ $serviceCat = Services_categories::find_all_order_by_exclude_nonFolder('category', 'ASC'); foreach($serviceCat as $serviceCats){ $ID = $serviceCats->id; $cat = ucwords($serviceCats->category); $servicesCatDateMod = $serviceCats->dateMod; if($checkCat = Services::if_CID_exists($ID)){ echo ' <url> <loc>'.make_cat_url('services_list', $ID, $cat).'</loc> <lastmod>'.$servicesCatDateMod.'</lastmod> <changefreq>daily</changefreq> <priority>0.8</priority> </url>'; } } } // SERVICE LIST $serviceCat = Services::find_all_order_by('title', 'ASC'); foreach($serviceCat as $serviceCats){ $ID = $serviceCats->id; $title = ucwords($serviceCats->title); $servicesDateMod = $serviceCats->dateMod; echo ' <url> <loc>'.make_url('services', $ID, $title).'</loc> <lastmod>'.$servicesDateMod.'</lastmod> <changefreq>yearly</changefreq> <priority>0.8</priority> </url>'; } // BLOG CAT $blogCat = Blog_categories::find_all_order_by('category', 'ASC'); foreach($blogCat as $blogCats){ $ID = $blogCats->id; $cat = ucwords($blogCats->category); $desc = $blogCats->smallDesc; $img = $blogCats->img; echo ' <url> <loc>'.make_cat_url('tips_list', $ID, $cat).'</loc> <lastmod>'.$servicesCatDateMod.'</lastmod> <changefreq>daily</changefreq> <priority>0.8</priority> </url>'; } // BLOG $blogCat = Blog::find_all_order_by('position', 'ASC'); foreach($blogCat as $blogCats){ $ID = $blogCats->id; $title = ucwords($blogCats->title); echo ' <url> <loc>'.make_url('tips', $ID, $title).'</loc> <lastmod>'.$servicesCatDateMod.'</lastmod> <changefreq>yearly</changefreq> <priority>0.8</priority> </url>'; } ?> XML Stylesheet (sitemap.xsl) Code: [Select] <?xml version="1.0" encoding="UTF-8"?><!-- DWXMLSource="http://test.powtest.co.uk/sitemap.xml" --> <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€"> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <xsl:template match="/"> <html> − <head> − <title> Adele Fifer </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> − <style type="text/css"> body { font-family: Arial, sans-serif; font-size:13px; } #intro { background-color:#CFEBF7; border:1px #2580B2 solid; padding:5px 13px 5px 13px; margin:10px; margin-top:40px; } #intro p { line-height: 16.8667px; } td { font-size:11px; } th { text-align:left; padding-right:30px; font-size:11px; } tr.high { background-color:whitesmoke; } #footer { padding:2px; margin:10px; font-size:8pt; color:gray; } #footer a { color:gray; } a { color:black; } #content { padding: 30px; } img, img a { border:none; } </style> </head> − <body> <h1>Adele Fifer Sitemap</h1> − <div id="content"> − <table cellpadding="5"> − <tr style="border-bottom: 1px solid black;"> <th>URL</th> <th>Priority</th> <th>Change Frequency</th> <th>LastChange</th> </tr> <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/> <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/> − <xsl:for-each select="sitemap:urlset/sitemap:url"> − <tr> − <xsl:if test="position() mod 2 != 1"> <xsl:attribute name="class">high</xsl:attribute> </xsl:if> − <td> − <xsl:variable name="itemURL"> <xsl:value-of select="sitemap:loc"/> </xsl:variable> − <a href="{$itemURL}"> <xsl:value-of select="sitemap:loc"/> </a> </td> − <td> <xsl:value-of select="concat(sitemap:priority*100,'%')"/> </td> − <td> <xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/> </td> − <td> <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/> </td> </tr> </xsl:for-each> </table> </div> − <div id="footer"> <a href="http://test.powtest.co.uk/about_adele_fifer">About Adele Fifer</a> </div> </body> </html> </xsl:template> </xsl:stylesheet> First of all I have no idea how to do this. But I know it can be done. A little help would be alot for me. Thank you in advance. So I want to go through a sitemap and visit each of the link on the sitemap and save the URL on to a database. Example: Quote HP 5550N A3 Colour Laser Printer Konica Minolta PagePro 1350W A4 Mono Laser Printer HP 9050dn A3 Mono Laser Printer HP 5550DTN A3 Colour Laser Printer HP 5550HDN A3 Colour Laser Printer HP 5550DN A3 Colour Laser Printer Lets say this was on the sitemap and it just continues with other product like this. I want to write a code where it will go to the first link and saves the product URL on to the database and continues to do the same until the last link. On my example it would be HP 5550DN A3 Colour Laser Printer. Any help??? Any ideas?? I am not asking someone to write the code for me.. Just need help and good direction I'm wanting to make a sitemap for my website but as it's quite big there are a lot of url's I need to include. I was wondering if anyone know's of a way this can be done using PHP. e.g. using PHP to generate a list of URL's. I had a think myself but wasn't sure how to do it. Thanks for any help. Hi, I have found a nice little script to write to the xml file for google, but it appears not to be updating the file. Could someone please let me know what might be wrong as this is the first time I've tried to do this. Code: [Select] $dom = new DomDocument('1.0', 'utf-8'); $dom->load('../sitemap.xml'); // if it's a string, $dom->load($xmlFile) if is a file // create the new node element $node = $dom->createElement('url'); // build node $node->appendChild($dom->createElement('loc', $title)); $node->appendChild($dom->createElement('lastmode', date(Y-m-d))); $node->appendChild($dom->createElement('changefreq', 'monthly')); $node->appendChild($dom->createElement('priority', '2')); // append the child node to the root $dom->documentElement->appendChild($node); // get the document as an XML string $xmlStr = $dom->save(); I was wondering if it was something to do with the [urlset] tag within the xml file I'm using? The xml file is just a standard google sitemap.xml Any help on this would be great Cheers Rob Hello, I have found the following code which creates a sitemap from the home directory of files. Please could you point me in the right direction for changing this so that it looks up from my sql database and for each name within the database creates an entry in the sitemap (e.g. www.mysite.com/[NAME]). Thanks for your help, Stu Code: [Select] <?php /******************************************************************************\ * Author : Binny V Abraham * * Website: http://www.bin-co.com/ * * E-Mail : binnyva at gmail * * Get more PHP scripts from http://www.bin-co.com/php/ * ****************************************************************************** * Name : PHP Google Search Sitemap Generator * * Version : 1.00.A * * Date : Friday 17 November 2006 * * Page : http://www.bin-co.com/php/programs/sitemap_generator/ * * * * You can use this script to create the sitemap for your site automatically. * * The script will recursively visit all files on your site and create a * * sitemap XML file in the format needed by Google. * * * * Get more PHP scripts from http://www.bin-co.com/php/ * \******************************************************************************/ // Please edit these values before running your script. //////////////////////////////////// Options //////////////////////////////////// $url = "http://www.WEBSITE_NAME.com/"; //The Url of the site - the last '/' is needed $root_dir = ''; //Where the root of the site is with relation to this file. $file_mask = '*.php'; //Or *.html or whatever - Any pattern that can be used in the glob() php function can be used here. //The file to which the result is written to - must be writable. The file name is relative from root. $sitemap_file = 'sitemap.xml'; // Stuff to be ignored... //Ignore the file/folder if these words appear in the name $always_ignore = array( 'local_common.php','images' ); //These files will not be linked in the sitemap. $ignore_files = array( '404.php','error.php','configuration.php','include.inc' ); //The script will not enter these folders $ignore_folders = array( 'Waste','php_uploads','images','includes','lib','js','css','styles','system','stats','CVS','.svn' ); //The default priority for all pages - the priority of all pages will increase/decrease with respect to this. $starting_priority = ($_REQUEST['starting_priority']) ? $_REQUEST['starting_priority'] : 70; /////////////////////////// Stop editing now - Configurations are over //////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// function generateSiteMap() { global $url, $file_mask, $root_dir, $sitemap_file, $starting_priority; global $always_ignore, $ignore_files, $ignore_folders; global $total_file_count,$average, $lowest_priority_page, $lowest_priority; /////////////////////////////////////// Code //////////////////////////////////// chdir($root_dir); $all_pages = getFiles(''); $xml_string = '<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd"> <?php # '; $modified_priority = array(); for ($i=30;$i>0;$i--) array_push($modified_priority,$i); $lowest_priority = 100; $lowest_priority_page = ""; //Process the files foreach ($all_pages as $link) { //Find the modified time. $handle = fopen($link,'r'); $info = fstat($handle); fclose($handle); $modified_at = date('Y-m-d\Th:i:s\Z',$info['mtime']); $modified_before = ceil((time() - $info['mtime']) / (60 * 60 * 24)); $priority = $starting_priority; //Starting priority //If the file was modified recently, increase the importance if($modified_before < 30) { $priority += $modified_priority[$modified_before]; } if(preg_match('/index\.\w{3,4}$/',$link)) { $link = preg_replace('/index\.\w{3,4}$/',"",$link); $priority += 20; } //These priority detectors should be different for different sites :TODO: if(strpos($link,'example')) $priority -= 30; //If the page is an example page elseif(strpos($link,'demo')) $priority -= 30; if(strpos($link,'tuorial')) $priority += 10; if(strpos($link,'script')) $priority += 5; if(strpos($link,'other') !== false) $priority -= 20; //Priority based on depth $depth = substr_count($link,'/'); if($depth < 2) $priority += 10; // Yes, I know this is flawed. if($depth > 2) $priority += $depth * 5; // But the results are better. if($priority > 100) $priority = 100; $loc = $url . $link; if(substr($loc,-1,1) == '/') $loc = substr($loc,0,-1);//Remove the last '/' char. $total_priority += $priority; if($lowest_priority > $priority) { $lowest_priority = $priority;//Find the file with the lowest priority. $lowest_priority_page = $loc; } $priority = $priority / 100; //The priority is given in decimals $xml_string .= " <url> <loc>$loc</loc> <lastmod>$modified_at</lastmod> <priority>$priority</priority> </url>\n"; } $xml_string .= "</urlset>"; if(!$hndl = fopen($sitemap_file,'w')) { //header("Content-type:text/plain"); print "Can't open sitemap file - '$sitemap_file'.\nDumping result to screen...\n<br /><br /><br />\n\n\n"; print '<textarea rows="25" cols="70" style="width:100%">'.$xml_string.'</textarea>'; } else { print '<p>Sitemap was written to <a href="' . $url.$sitemap_file .'">'. $url.$sitemap_file .'></a></p>'; fputs($hndl,$xml_string); fclose($hndl); } $total_file_count = count($all_pages); $average = round(($total_priority/$total_file_count),2); } ///////////////////////////////////////// Functions ///////////////////////////////// // File finding function. function getFiles($cd) { $links = array(); $directory = ($cd) ? $cd . '/' : '';//Add the slash only if we are in a valid folder $files = glob($directory . $GLOBALS['file_mask']); foreach($files as $link) { //Use this only if it is NOT on our ignore lists if(in_array($link,$GLOBALS['ignore_files'])) continue; if(in_array(basename($link),$GLOBALS['always_ignore'])) continue; array_push($links, $link); } //asort($links);//Sort 'em - to get the index at top. //Get All folders. $folders = glob($directory . '*',GLOB_ONLYDIR);//GLOB_ONLYDIR not avalilabe on windows. foreach($folders as $dir) { //Use this only if it is NOT on our ignore lists $name = basename($dir); if(in_array($name,$GLOBALS['always_ignore'])) continue; if(in_array($dir,$GLOBALS['ignore_folders'])) continue; $more_pages = getFiles($dir); // :RECURSION: if(count($more_pages)) $links = array_merge($links,$more_pages);//We need all thing in 1 single dimentional array. } return $links; } //////////////////////////////// Display ///////////////////////////// ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.1 Transitional//EN"> <html> <head> <title>Sitemap Generation Using PHP</title> <style type="text/css"> a {color:blue;text-decoration:none;} a:hover {color:red;} </style> </head> <body> <h1>PHP Google Search Sitemap Generator Script</h1> <?php if($_POST['action'] == 'Create Sitemap') { generateSiteMap(); ?> <h2>Sitemap Created...</h2> <h2>Statastics</h2> <p><strong><?php echo $total_file_count; ?></strong> files were found and indexed.<br /> Lowest priority of <strong><?php echo $lowest_priority; ?></strong> was given to <a href='<?php echo $lowest_priority_page; ?>'><?php echo $lowest_priority_page; ?></a></p> Average Priority : <strong><?php echo $average; ?></strong><br /> <h2>Redo</h2> <?php } else { ?> <p>You can use this script to create the sitemap for your site automatically. The script will recursively visit all files on your site and create a sitemap XML file in the format needed by Google. </p> <p>You can customize the result by changing the starting priorities.</p> <h2>Set Starting Priority</h2> <?php } ?> <form action="create_sitemap.php" method="post"> Starting Priority : <input type="text" name="starting_priority" size="3" value="<?php echo $starting_priority; ?>" /> <input type="submit" name="action" value="Create Sitemap" /> </form> </body> </html> I wish to create a sitemap for a shopping cart and so far it seem this needs to be in XML format? is this true ? If so are there any templates that I can use to base my sitemap on. I have a simple php script that updates my sitemap automatically. However, when you click the link to the sitemap at www.bomstudies.com/sitemap-xml.php - the last mod date is showing 1969. The php script works for files that are not in sub folders. such as /talks or /commentary. I just need to know what snippet of code i should add, change, or delete to the sitemap php side of it to show the correct last mod date for my xml sitemap. I greatly appreciate your help.
Thanks -
Here is some of my code:
The Config Code: posted as config.php
<?php |