使用file_get_content函数连接FTP帐户


connect ftp account with file_get_content function

我有一个FTP帐户。我想连接到FTP与file_get_contents。这可能吗?如果没有,我该怎么做呢?

我想为一个类似于hotfile或rapidshare的上传脚本做这个

file_get_contents('ftp://username:password@host.com/');

如果我从你对@genesis的回答的评论中理解你想做什么,你需要做的是:

$file = file_get_contents("derpost:pass**@ftp1.freakshare.com/Freez%20Screen%20Vide‌​o%20Capture.lnk");
header('Content-Disposition: attachment; filename="image.jpg"'); // Change file name as appropriate
header('Content-Length: '.strlen($file));
header('Content-Type: image/jpeg'); // Change this MIME type as appropriate
echo $file;