Home » Create Dynamic Sitemap Using PHP with Mysql

Create Dynamic Sitemap Using PHP with Mysql

Create Dynamic Sitemap Using PHP with Mysql

In this Post We Will Explain About is Create Dynamic Sitemap Using PHP with Mysql With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to SiteMap XML Dynamic SiteMap Generator using PHPExample

In this post we will show you Best way to implement Create Dynamic XML Sitemap & Rss Feed using PHP & MySQL, hear for xml – Creating dynamic sitemap with phpwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Read Also:  Laravel Redirect Tutorial Example From Scratch

Creating Dynamic XML Sitemaps using PHP Example

Sitemaps generally to be in XML data format, so that does not mean any all that We have to write simple XML source code for each page data manually. Let’s start to build a XML based sitemap together with simple PHP scripts.


/* Creating Dynamic XML Sitemaps using PHP devloped by Pakainfo.com*/
header("Content-Type: application/xml; charset=utf-8"); 
echo ''.PHP_EOL; 
echo '' .PHP_EOL; 
function create_Elem($url) {
echo ''.PHP_EOL; 
echo ''.$url.''. PHP_EOL; 
echo 'weekly'.PHP_EOL; 
echo ''.PHP_EOL;
echo ''; 

What is an XML Sitemap

Almost all some information we need to know here site about Sitemaps is available at officel site like as a http://www.sitemaps.org.

Read Also:  Difference between two dates in years, months, days in PHP

How to submit Sitemap to search engines

Google:simple Google Webmaster search Tools
Bing: simple Bing Webmaster search Tools
Yandex:simple Yandex Webmaster search Tools
Baidu:simple china Baidu Webmaster search Tools

Dynamic Create Site Map using PHP

This is a simple script, written in simple PHP, that will create or generate a simple dynemic site map based on the folder or directory structure of the web-site. We can easily simple exclude files and/or some directories.

Read Also:  Show Hide Div on Click using Angular Example

 $sql_get = "SELECT  * FROM data_post";
 $data_result = mysql_query($sql_get) or die(mysql_error());
 header('Content-Type: application/xml');
 echo ''."\n";
 echo "";
 while($row = mysql_fetch_assoc($data_result)) {


I hope you have Got What is Create Dynamic XML Sitemap & Rss Feed using PHP & MySQL And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Create Dynamic XML Sitemaps Using PHP MYSQL
  2. Read Also:  Server-side processing Laravel DataTables
  3. Read Also:  Laravel 6 Guzzle PHP HTTP client Request
  4. Read Also:  Event Watch route change with VueJS
  5. Read Also:  Jquery Get Number of Characters String length
  6. Read Also:  Strong Random Password Generator Using VueJS
  7. Read Also:  Laravel 6 JQuery Ajax Post Request Example
  8. Read Also:  Creating Dynamic XML Sitemaps Generator Using PHP MySQLi
  9. Read Also:  How to Increment and Decrement Column Value in Laravel 6?
  10. Read Also:  Laravel 6 Guzzle PHP HTTP client Request

Leave a Comment

Your email address will not be published. Required fields are marked *