HttpRequestLogin: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
==See Also==
==See Also==
{{HTTP functions}}
{{HTTP functions}}
[[Category:Incomplete]]
[[Category:Needs Example]]

Revision as of 18:09, 1 January 2008

This function makes the user's browser show a 'basic authentication' login box. The result of the login is handled automatically by the server. If the user has not logged in satisfactorily, you should just call the httpRequestLogin function again.

This function works by setting a header ('Authentication') and a return code (403 - Authentication required). As such, nothing happens until you finish the page. The content of the page is generally not displayed unless the login fails.

Syntax

bool httpRequestLogin ( )

Returns

Returns true if the relevant headers and return codes have been set, false otherwise.

Example

See Also

These functions can only be used from within lua blocks in HTML pages hosted by the server