Hi, i need to do a loop of the array of this function found in the WebUI API:
public function getTorrents()
WebUI API: http://pastebin.com/m76205d0b
I have this one, but it doesn't work.
$utorrent = new uTorrent();
$utorrent->host = $_SESSION['host'];
$utorrent->user = $_SESSION["user"];
$utorrent->pass = $_SESSION["pass"];
$torrents = $utorrent->getTorrents();
foreach($torrents as $torrent) {
echo $torrent[UTORRENT_TORRENT_NAME]."\n";
}
How do i use the "public function getTorrents()" to get the array into a foreach loop?
I really appreciate your help 😉