Skip to content

Instantly share code, notes, and snippets.

@ikr7
Created February 12, 2014 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikr7/8950070 to your computer and use it in GitHub Desktop.
Save ikr7/8950070 to your computer and use it in GitHub Desktop.
イエーイ✌('ω')✌ UltimateOAuth ( https://github.com/Certainist/UltimateOAuth ) が必要だよ〜
<?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