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 | |
$user=NULL; | |
while(1){ | |
echo "command exit -> :q\n"; | |
echo 'username : '; | |
$fp=fopen("php://stdin","r"); | |
$user=trim(fgets($fp,64)); | |
fclose($fp); | |
if($user===':q') break; | |
echo "20*n n="; |
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
//when u r watchin' friend profile on mixi, jump to friend's mixi echo list page | |
var id=window.location.href.replace('http://mixi.jp/show_friend.pl?id=',''); | |
window.location.href='http://mixi.jp/list_echo.pl?id='+id; |
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 | |
//fucntion library for VatsimPHP | |
class vatsimtool{ | |
//integer to rating string | |
function rating($i){ | |
switch($i){ | |
case 1: return "Pilot/Observer"; break; | |
case 2: return "Student "; break; | |
case 3; | |
case 4: return "Senior Student"; break; |
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
#-*- encoding: UTF-8 -*- | |
require 'rubytter' | |
id='twitter_id' | |
pass='twitter_password' | |
rubytter=Rubytter.new(id,pass) | |
puts 'input status id, you wanna delete.' | |
print 'status id = ' | |
statusid=gets.chomp | |
rubytter.remove_status(statusid) |
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 | |
//how 2 use | |
//only working on console. | |
//ex) $php5 filename.php username n | |
//n of count of post 20*n | |
//u can get user's post. | |
$user=$argv[1]; | |
$count=$argv[2]; |
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 | |
$user=$argv[1]; | |
$count=$argv[2]; | |
$got=0; | |
$f=false; | |
for($i=1;$i<=$count;$i++){ | |
$url="http://twitter.com/statuses/user_timeline/$user.json?page=$i"; | |
$file=@file_get_contents($url); | |
if($file){ | |
$temp=json_decode($file,true); |
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 | |
//TwitterのAPIの残機を取得する | |
require_once 'HTTP/Request.php'; | |
define('user','userid'); | |
define('pass','password'); | |
$apilim='http://twitter.com/account/rate_limit_status.json'; | |
$req=& new HTTP_Request($apilim); | |
$req->setBasicAuth(user,pass); | |
$req->sendRequest(); | |
$result=$req->getResponseBody(); |
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
'hourly_limit' => int 100 | |
'reset_time' => string 'Sat May 02 06:58:23 +0000 2009' (length=30) | |
'reset_time_in_seconds' => int 1241247503 | |
'remaining_hits' => int 95 |
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 | |
/* | |
you can get vatsim's online status. | |
httprequest from another script. | |
data format : http://www.bbflights.com/VatsimPHP/manual.php | |
using Vatsimphp by Brian Beach http://www.bbflights.com/VatsimPHP/ | |
*/ | |
require_once 'VatsimPHPgenerator.php'; | |
$vsg=& new VatsimPHP; |
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 'HTTP/Request.php'; | |
$url='http://exp.rw12.net/vatsim_new/gen_json.php'; | |
$req=& new HTTP_Request($url); | |
$req->sendRequest(); | |
$res=$req->getResponseBody(); | |
$decoded=json_decode($res,true); | |
//list of online | |
echo "<ul>\n"; | |
foreach($decoded as $data){ |
OlderNewer