1
我正在使用php的serverside Youtube上传器。使用this script我将视频文件成功上传到Youtube。但是,我不想手动选择文件,但我想上传已在我的服务器上的文件。 我知道文件名/路径(并且如果这有助于以任何方式同样具有视频base64编码),并且我拥有Youtube所需的所有密钥和令牌。但是,我不知道如何将所有这些信息转换为适当的http-post。用直接文件上传替换表单输入文件
<form action="<?php echo($response->url); ?>?nexturl=<?php echo(urlencode($nexturl)); ?>" method="post" enctype="multipart/form-data">
<input id="file" type="file" name="file"/>
<input type="hidden" name="token" value="<?php echo($response->token); ?>"/>
<input type="submit" value="go" />
</form>
我已经尽了最大努力Digg的深入卷曲,但我不知道这是什么会帮助我在这里。
我还是建议使用curl,我认为是最好的选择。 – khael