PHP Classes
elePHPant
Icontem

File: xml.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dan From  >  Find  >  xml.php  >  Download  
File: xml.php
Role: Example script
Content type: text/plain
Description: The XML generator file
Class: Find
Search files on the server side
Author: By
Last change:
Date: 8 years ago
Size: 600 bytes
 

Contents

Class file image Download
<?
/*
* This is the PHP file that generates the XML page
*/

ob_start();
session_start();
include
'find.class.php';

$dir = $_GET[dir];
$fil = $_GET[fil];

$find = new find($fil, $dir);

$filer = $find->ex2();

echo
"<xmlresponse>";
$antal = 0;
    foreach (
$find->ex() AS $hvor){
        if(
is_dir($hvor."/".$filer[$antal])){
            echo
'<type>dir</type>';
        } else {
            echo
'<type>file</type>';
        }
        echo
' <file>'.$filer[$antal].'</file>';
        echo
' <messages>'.$hvor.'</messages>';
       
$antal++;
    }
    if (
$antal == 0){
        echo
' <messages>Nothing found</messages>';
    }

echo
"</xmlresponse>";
ob_end_flush();
?>