Last active
December 21, 2015 17:38
-
-
Save Ditti4/6341401 to your computer and use it in GitHub Desktop.
Little functions to get the Steam server status (and echo it, depending on the function you'd like to use) from http://issteamdown.com. Supposed to be used in chat bots and similar things.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function echoSteamStatus() | |
{ | |
echo (strpos(file_get_contents('http://issteamdown.com'), 'Steam is down') ? 'Steam is down.' : 'Steam is up.').' Source: http://issteamdown.com'; | |
} | |
function getSteamStauts() | |
{ | |
//true means it's up, false means it's down | |
return (strpos(file_get_contents('http://issteamdown.com'), 'Steam is down') ? false : true); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment