cpanel api fileman alternative

Posted by Coombesy on Server Fault See other posts from Server Fault or by Coombesy
Published on 2012-05-16T05:36:42Z Indexed on 2012/06/03 4:43 UTC
Read the original article Hit count: 553

Filed under:
|
|

trying to remotely unpack a zip file, then move the contents on cpanel servers. Some research led me to xmlApi class and the fileman module. And here my problem lies as Fileman module is returning html based on the cpanel theme (which we won't know) - and all I need is a list of files.

here is the code flow: * using ftp, the zip is uploaded * using Fileman module unpack zip * loop through unpacked files and move

here is my call to list the files:

$files_html = $xml->api1_query($user, "Fileman", "listfiles", array(
        "{$ftp_dir}",   //source dir
        0       //chooser
    ));

and it is returning the html for the filemanager - which is going to be different based on the cpanel theme. Surely their has to be another way to simply just list the files in that directory?

any help would be appreciated, been researching this for past day and can't find solution anywhere. cheers ;)

© Server Fault or respective owner

Related posts about php

Related posts about cpanel