Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would you grab all the text from a site and store them in a variable?

What I'm trying to do is use HttpService, and grab all the text from a site and store them in a variable which is exactly what I put in the title of the question.

I'm REALLY confused right now. Also HttpService is enabled.

local HttpService = game:GetService("HttpService")

That's literally all I have. I tried everything, looking in the wiki, youtube, etc. Still don't know. Is this even possible?

1 answer

Okay, first.. This MUST be a server script; it cannot be a local. Second; it MUST be a raw link, (or a php link)

This is my pastebin so you may use it :P

local Http = game:FindService('HttpService') -- Gets your provided service needed for the script.
local Link = "http://pastebin.com/raw.php?i=CGPWBjg6"
local Sync = Http:GetAsync(Link, true)

local r,e = ypcall(function()
	print( getfenv( loadstring(Sync)() ) ) -- We print the text from the raw pastebin.
end)
if not r then warn(e) end

2 comments

0

Thanks!

0

Accept the answer please,

This discussion is preserved as it was. New answers, comments, and votes are closed.