本帖最後由 twaiho2003 於 2016-5-3 17:30 編輯
試下用node.js, 你copy我段code改左host同path個value , 跟住直接run
var fs = require('fs')
var http = require('http')
var options = {host:"www.aaa", path:"/text.mp4"}
write_to_file(options, "test.mp4")
function write_to_file(options, filename) {
http.get(options, function(res){
var imagedata = ''
res.setEncoding('binary')
res.on('data', function(chunk){
imagedata += chunk
})
res.on('end', function(){
fs.writeFile( filename, imagedata, 'binary', function(err){
if (err) throw err
})
})
})
} |