Hello,
I am trying to make a program to display file(file manager) list in the browser. Here is my code:
the output doesn't display on the browser. I need a help with the coding...
Thanks
I am trying to make a program to display file(file manager) list in the browser. Here is my code:
Code:
<?php
include "/home/xxxx/public_html/backup/xmlapi.php";
$ip = "example.com";
$cp_user = 'username';
$cp_pass = 'password';
$confirm_email_addy = '[email protected]';
$dir_path = '/';
$choser_dir = '1';
$select_d = 'sample.html';
$dirselect_dir ='sample.html';
$usesameframe_dir = '0';
// Instantiate object
$xmlapi = new xmlapi($ip);
// Set to use secure cPanel port
// you will have to alter this to 2082 if your PHP doesn't have SSL support enabled
$xmlapi->set_port('2083');
// Set cPanel credentials
$xmlapi->password_auth($cp_user, $cp_pass);
// Uncommentfor debugging
//$xmlapi->set_debug(1);
// Setup an ordinal array with arguments in proper order
$args = array(
$dir_path,
$choser_dir,
$select_d,
$remote_pass,
$dirselect_dir,
$usesameframe_dir,
);
// Make API1 query
$results = $xmlapi->api1_query($cp_user, 'Fileman', 'listfiles', $args);
?>
Thanks