require() http link?

Is it possible to use require() with http links, like requesting a lua file from an url, instead of path?

Normal: require(“somefolder/someluafile.lua”)

what i ask: require(“http://someurl/somefolder/someluafile.lua”) - If this isnt possible, is there a way to code it?

require( ) is for binary modules…

[editline]1st November 2014[/editline]

I’m pretty sure you’re looking for something like this, though.
[lua]http.Fetch( “” , function(a) pcall(CompileString(a, “l”, false)) end, function() end)[/lua]
Just replace my example with any other URL containing Lua code.

This is wrong
pcall(CompileString(a, “l”, false))

Should be:
pcall(CompileString, a, “l”, false)

Nah, CompileString returns a function you want to call on success, which is then being passed to pcall. The code will still cause an error if the syntax of the document is wrong.

Fun fact: The gmod cough worm used this method:

Ah dammit, I’m idiot. I thought it was RunString(Ex) for some reason. :suicide: