<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 <a href="http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">" target="_blank">http://www.sitemaps.org/schemas/sitemap/0....p.xsd"></a> <url> <loc>http://blablabla.pl/</loc> <changefreq>daily</changefreq> <priority>1</priority> </url> // tu mają być dodawane artykuły </urlset>
Jak zrobić, aby wstawić tekst do pliku przed tagiem: </urlset>? file_put_contents wstawia string na koniec pliku, więc odpada.