Posted inProgramming / Codeigniter / Mysql / Mysqli / php

Create Dynamic XML Sitemaps Using PHP MYSQL

Create Dynamic XML Sitemaps Using PHP MYSQL

In this Post We Will Explain About is Create Dynamic XML Sitemaps Using PHP 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 xml – Creating dynamic sitemap with php and MYSQLExample

In this post we will show you Best way to implement Creating Dynamic XML Sitemaps using PHP, hear for Make Dynamic XML sitemap in PHP Scriptwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Database

-- Table structure for table `dynemic_page`

CREATE TABLE IF NOT EXISTS `dynemic_page` (
  `dyn_page_id` int(11) NOT NULL,
  `custom_page_title` text NOT NULL,
  `my_page_url` text NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

ALTER TABLE `dynemic_page`
  ADD PRIMARY KEY (`dyn_page_id`);
  
ALTER TABLE `dynemic_page`
  MODIFY `dyn_page_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
  
-- Dumping data for table `dynemic_page`

INSERT INTO `dynemic_page` (`dyn_page_id`, `custom_page_title`, `my_page_url`) VALUES
(1, 'Vuejs Hello World Example | Introduction — Vue.js | Vuejs Example', 'vuejs-hello-world-example-introduction-vue-js-vuejs-example/'),
(2, 'Angularjs autocomplete Textbox example – Autocomplete Directive', 'angularjs-autocomplete-textbox-example-autocomplete-directive/'),
(3, 'AngularJS and CRUD Using RESTful APIs Example\r\n', 'codeigniter-tutorial-hello-world-example-steps/'),
(4, 'AngularJS Form Validation Example\r\n', 'angularjs-form-validation-example/'),
(5, 'jQuery Basic Selectors with Adding a class to even an odd List-Elements\r\n', 'jquery-basic-selectors-adding-class-even-odd-list-elements/'),
(6, 'dependable Country-State-City Cascading dropdowns in AngularJs\r\n', 'dependable-country-state-city-cascading-dropdowns-angularjs/'),
(7, 'JSON Encoder and Decoder For JavaScript with Example\r\n', 'json-encoder-decoder-javascript-example/'),
(8, 'AngularJs Application Folder Structure\r\n', 'angularjs-application-folder-structure/'),
(9, 'How to Add and remove active class on click using AngularJS\r\n', 'add-remove-active-class-click-using-angularjs/'),
(10,'http POST method request and response in angularjs\r\n', 'http-post-method-request-response-angularjs/');  
  

sitemap_index.php

'.PHP_EOL; 

echo '' . PHP_EOL;

while($data_row = mysqli_fetch_array($data_result))
{
 echo '' . PHP_EOL;
 echo ''.$start_url_base. $data_row["my_page_url"] .'/' . PHP_EOL;
 echo 'daily' . PHP_EOL;
 echo '' . PHP_EOL;
}

echo '' . PHP_EOL;

?>

.htaccess

RewriteEngine On

RewriteRule ^sitemap\.xml/?$ sitemap_index.php

Example

I hope you have Got What is xml – Creating dynamic sitemap with php and 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.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

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

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype