• Getting a Website + VGUI
    2 replies, posted
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\r\n\r\n") Response = receive('*line') client:close() return(Response) end[/lua] 2) 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
[QUOTE=|FlapJack|;19012222]1) http:Get 2) Usermessages[/QUOTE] Both methods work perfectly. Thanks!
Sorry, you need to Log In to post a reply to this thread.