←  Ask a Pro

ComputerCraft | Programmable Computers for Minecraft

»

How do I download pastebin code via http api?

willwac's Photo willwac 14 Sep 2013

View PostHotGirlEAN, on 28 December 2012 - 07:52 PM, said:

When HTTP API is enabled and you just wish to download without using the Pastebin program use the following code or similar code:
resp = http.get("http://pastebin.com/raw.php?i="..CODE)
if resp then
handler=io.open(FILE,"w")
handler:write(resp.readAll())
handler:close()
return true -- It worked
else
return fasle -- It failed
end

Thanks, this really helped.
Quote

willwac's Photo willwac 03 Oct 2013

Oh! what did you do to fix it?
Quote

AgentE382's Photo AgentE382 03 Oct 2013

View PostSignify, on 10 April 2013 - 04:34 PM, said:

The main reason an admin would keep it disabled is if he thinks CC is so OP and the only way to keep it fair is to force people to write their own code. Huge results? Then give up your own time and thinking power to get them! Using a command to get them in a few seconds is a bit cheaty. ;)

I've disabled the default excavate and tunnel programs on my server.

Mudkip's AutoTyper :D :P
Quote