PHP code example of satmaelstorm / large-array-writer
1. Go to this page and download the library: Download satmaelstorm/large-array-writer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
satmaelstorm / large-array-writer example snippets
$writer = new LargeArrayWriter(
"sitemap_%NUM%.xml",
"/tmp/" ,
true,
"<?xml version=\"1.0\" encoding=\"UTF-8\"
$writer->addString("<url><loc>URL</loc><lastmod>DATE</lastmod><changefreq>daily</changefreq></url>\n");
$files = $writer->finalize();