Getting a Website + VGUI

Hi,

How do I:

  1. Get the source of a website with lua? I have tried this but it does not seem to load the socket module:

[lua]function GetLinkData(query)
require(“socket”)
client = socket.connect(“localhost”, 80)
client:timeout(0)
client:send(“GET /test.php?” … query … " HTTP/1.0

")
Response = receive(’*line’)
client:close()
return(Response)
end[/lua]

  1. Trigger a function on the client side of the scripting from the server side (I have a command which will open a GUI for the client but need to trigger it from the server init.lua file).
  1. http:Get
  2. Usermessages

Both methods work perfectly. Thanks!