Description

PlayOn Scripts can provide access to sites which require login credentials.

If a script requires this feature it must contain a Login Meta Block so the Username and Password boxes are shown in PlayOn Settings. Once the user sets their credentials in PlayOn Settings, the code in the Login Meta Block will execute to validate the credentials are correct.

--[[Login

--Lua script using global variables username and password and returning true or false.

EndLogin]]--

The global variables username and password are set with the user's login information and the Login Meta Block code must return either true or false based on whether the credentials work.

Example

--[[Login
--username and password are passed as global variables
--Perform login in a site specific way via POST or GET.
local result = GetURL("http://notarealsite.nars/login.php?username="..username.."&password=".. password);
if (result ~= "<error>") then
	return true;
else
	return false;
end
EndLogin]]--

See Also