Ok, you need a small API, that runs the glob() function and returns the result. Smal example (not tested)
Client (ManiaLive):
Code: Select all
<?php
$api_url = http://api.example.com/get_tracklist.php?param=someparam&moreparam=param2;
$response = file_get_contents($api_url); // this will open the script, execute it and save the result in $response
$response = json_decode($response); // Decode the Json code
print_r($response); // Just an output for testing
?>
Server (DedicatedServer - get_tracklist.php):
Code: Select all
<?php
$param = $_GET["param"]; // This is the first prameter from the URL (?param=someparam)
$moreparam = $_GET["moreparam"]; // This is the second prameter from the URL (?moreparam=param2)
// Get a list of files in the current directory
$filelist = array(); // Initialize ...
foreach (glob("*.*") as $filename) {
$filelist[] = $filename; // Adds the current filename to the filelist
}
echo json_encode($filelist); // Arrays can´t be echot, so we json encode it
?>
I hope you understand that.
Note: Untested
Note2: Unsecure because data is not hashed
Note3: For a very good tutorial, click here:
http://net.tutsplus.com/tutorials/php/c ... plication/
Note4: the clientfile mus not be on a webserver but the Serverfile
Note5: JSON (on client and server) and PHP 5.3 (only client) required
Note6: The same is also possible with cURL but for that you should read the tutorial from tutsplus.
PS: Many Notes, I know ^^