Skip to content

Instantly share code, notes, and snippets.

@Ditti4
Last active December 21, 2015 17:38
Show Gist options
  • Save Ditti4/6341401 to your computer and use it in GitHub Desktop.
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.
<?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