All pastes #548309 Raw Edit

Something

public php v1 · immutable
·published 2007-06-07 18:10 UTC
rendered paste body
<?php    $config_ok = true;    require_once "intermission/config/config.php";    require_once "intermission/libs/intermission.php";    $intermission = new Intermission($config_sock);    $torrents = array();    foreach ($intermission->helper_get_info_all(array("id", "name", "size")) as $info) {        $torrent = $intermission->helper_get_status($info["id"], array("id", "completed", "state"));        $torrent["name"] = $info["name"];        $torrent["size"] = $info["size"];        array_push($torrents, $torrent);    }    $intermission->sock_close();    echo json_encode($torrents);?>