Created
March 19, 2012 01:19
-
-
Save mgng/2088960 to your computer and use it in GitHub Desktop.
twitterで予約されているアカウント名一覧取得
This file contains hidden or 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
<button onclick="read()">取得してみる</button> | |
<div id="unkoelm"></div> | |
<script type="text/javascript"> | |
function read(){ | |
var scr = document.createElement('script'); | |
scr.type='application/javascript'; | |
scr.charset='utf-8'; | |
scr.src='https://api.twitter.com/1/help/configuration.json?callback=unko'; | |
document.body.appendChild(scr); | |
} | |
function unko(json) { | |
document.getElementById('unkoelm').innerHTML = json.non_username_paths.join(' / '); | |
} | |
</script> |
This file contains hidden or 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 | |
$json = json_decode( file_get_contents('https://api.twitter.com/1/help/configuration.json') ); | |
echo implode( ' / ', $json->non_username_paths ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment