asteroidsteam icon

onlineInstruct

asteroidsteam | PRO | 04/01/18 09:00:12 PM UTC | 0 ⭐ | 517 👁️ | Never ⏰ | []
Lua |

560 B

|

None

|

0 👍

/

0 👎

local links = {
}
function explode(div,str)
  if (div=='') then return false end
  local pos,arr = 0,{}
  for st,sp in function() return string.find(str,div,pos,true) end do
    table.insert(arr,string.sub(str,pos,st-1))
    pos = sp + 1
  end
  table.insert(arr,string.sub(str,pos))
  return arr
end
for i=1,#links do
  local a = explode(",",links[i])
  if http.checkURL(a[1]) then
    local files = http.get(a[1])
    local code = files.readAll()
    files.close()
    local file = fs.open(a[2],"w")
    file.write(code)
    file.close()
  end
end

Comments