Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EbrahemSamer's avatar

How to Generate XML Sitemap? ( PHP Native )

Hello

I am developing website that compare electronics products prices in amazon and noon .....

Client ask me to do something I do not understand ......

He told me to "" Add feature to add all products and main pages and category pages into Generated XML Sitemap and give it order to auto regenerate by corn every day at 3 Am.""

Any Ideas

0 likes
1 reply
martinbean's avatar
Level 80

@ebrahemsamer Your client wants you to generate a sitemap using (I’m guessing) a cronjob every day at 3 AM.

So look up the format of XML sitemaps, and then create a script that goes through each of your product/main/category pages in your database and adds a node to an XML sitemap file.

Please or to participate in this conversation.