Skip to content

Instantly share code, notes, and snippets.

View imamo's full-sized avatar

Danijel Ocepek imamo

View GitHub Profile
@imamo
imamo / get-page-list-for-folder.php
Created September 2, 2011 06:38 — forked from eanticev/get-page-list-for-folder.php
Pagelime Page Listing using FTP-XML
<?php
function pagesForFolder($folderName) {
$pages = array();
// this is the path to the sitemap XML that Pagelime publishes
$pages_path = "/cms-assets/xml/sitemap.xml";
// if the XML file exists, keep going
if (file_exists($_SERVER["DOCUMENT_ROOT"].$pages_path)) {
// initialize an XML DOM Document
$xml = new DOMDocument;