Created
February 12, 2014 04:30
-
-
Save ikr7/8950070 to your computer and use it in GitHub Desktop.
イエーイ✌('ω')✌ UltimateOAuth ( https://github.com/Certainist/UltimateOAuth ) が必要だよ〜
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 | |
require_once("./UltimateOAuth.php"); | |
$consumer_key = ""; | |
$consumer_secret = ""; | |
$access_token = ""; | |
$access_token_secret = ""; | |
$uo = new UltimateOAuth( | |
$consumer_key, | |
$consumer_secret, | |
$access_token, | |
$access_token_secret | |
); | |
$servers = JSON_decode(file_get_contents("https://pvp.minecraft.jp/servers.json")) -> servers; | |
foreach($servers as $key => $server){ | |
$nextMap = $server -> Server -> nextMap; | |
if( | |
$nextMap == "Out Post" || | |
$nextMap == "Fluffy Mine" || | |
$nextMap == "The Siege" || | |
$nextMap == "The Two Towers" || | |
$nextMap == "Cold Bridge DTC" | |
){ | |
$text = "@aWtyNw__ "; | |
$text = $text.($server -> Server -> name)." の 次のマップは ".nextMap." です。 #JPMCPvP"; | |
$uo -> post("statuses/update", "status=".$text); | |
print($uo); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment