string GetUrlText(string url)
Attempts to connect to the a given URL, and returns the contents. If it fails, it will instead return that site's Error 404 (File not Found) message. Could possibly be used in conjunction with a PHP-enabled page, allowing cool stuff like a dynamic online high-score chart, or something. Also, I'm guessing if a webhost is completely down, Verge will crash hard.
// Log the current VergeC functions from vecna's website. Log (GetUrlText("http://vecna.verge-rpg.com/v3vergec.txt")); string username, password; // Advanced Functionality: Send username and password. if (!strcmp(GetUrl("http://127.0.0.1/login.php?username="+username+"&password="+password), "Okay, you've connected successfully.") { // Let the clients who successfully login continue. SocketSendString(i, "RPL_LOGINSUCCESSFUL"); } else { // Disconnect clients who fail at the login. SocketSendString(i, "ERR_LOGINFAILURE"); SocketClose(i); }
There are no talkbacks on this documentation page yet. Post the first?
Doc Nav |
Your docs |