TeamSpeak3/Node/Server.php
public function transferInitDownload($clientftfid, $cid, $name, $cpw = "", $seekpos = 0)
    {
        $download = $this->execute(
            "ftinitdownload",
            array("clientftfid" => $clientftfid, "cid" => $cid, "name" => $name, "cpw" => $cpw, "seekpos" => $seekpos)
        )->toList();

        if (array_key_exists("status", $download) && $download["status"] != 0x00) {
            throw new Ts3Exception($download["msg"], $download["status"]);
        }

        $download["cid"] = $cid;
        $download["file"] = $name;

        if (!array_key_exists("ip", $download) || $download["ip"]->startsWith("0.0.0.0")) {
            $download["ip"] = $this->getParent()->getAdapterHost();
            $download["host"] = $download["ip"];
        } else {
            $download["ip"] = $download["ip"]->section(",");
            $download["host"] = $download["ip"];
        }

        Signal::getInstance()->emit("filetransferDownloadInit", $download["ftkey"], $download);

        return $download;
    }
public function transferInitDownload($clientftfid, $cid, $name, $cpw = "", $seekpos = 0)
    {
        $download = $this->execute(
            "ftinitdownload",
            array("clientftfid" => $clientftfid, "cid" => $cid, "name" => $name, "cpw" => $cpw, "seekpos" => $seekpos)
        )->toList();

        if (array_key_exists("status", $download) && $download["status"] != 0x00) {
            throw new Ts3Exception($download["msg"], $download["status"]);
        }

        $download["cid"] = $cid;
        $download["file"] = $name;

        if (!array_key_exists("ip", $download) || $download["ip"]->startsWith("0.0.0.0")) {
            $download["ip"] = $this->getParent()->getAdapterHost();
            $download["host"] = $download["ip"];
        } else {
            $download["ip"] = $download["ip"]->section(",");
            $download["host"] = $download["ip"];
        }

        Signal::getInstance()->emit("filetransferDownloadInit", $download["ftkey"], $download);

        return $download;
    }
Initializes a file transfer download. $clientftfid is an arbitrary ID to identify the file transfer on client-side.

@param  integer $clientftfid
@param  integer $cid
@param  string $name
@param  string $cpw
@param  integer $seekpos
@throws Ts3Exception
@return array