ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: themothershipp on Jan 04, 2021, 09:28 PM

Title: How to access the internet and specifically http/ https
Post by: themothershipp on Jan 04, 2021, 09:28 PM
I am new to this mod and coding in general. I want to know how to display [on a monitor to the right with the size; 6(length) x 2(hight)] an HTTP/ HTTPS. I don't know if it is possible to get things like google and youtube etc. I hope by writing this, someone can help me to make this idea a reality. PS. How do you make a socket? Thank You!
Title: How to access the internet and specifically http/ https
Post by: QuickMuffin8782 on Jan 19, 2021, 05:28 PM
There's already a browser in development that'll display web pages. (Called CCBrowser, it's starting to lead to 2.0)
Title: How to access the internet and specifically http/ https
Post by: SamH on Jan 21, 2021, 09:23 AM
Hello! im the dev of CC Browser!. ''Sockets'' cant be created however there is the rednet api that can be used between in game computers. To access files on the real web just use
page, err = http.get("http://example.com/")
if page then
    data = page.readAll()--This returns a string of the content
else
    error(err)--This is what calls if there is a 404 for example
end