Created
June 19, 2013 18:18
-
-
Save tlongren/5816566 to your computer and use it in GitHub Desktop.
Check if API url is online before proceeding with calls to said API
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 | |
$checkapi = (@fsockopen("solus.fliphost.net", 443, $errno, $errstr, 0.4) ? "up" : "down"); | |
echo $checkapi; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment