Created
December 11, 2014 16:03
-
-
Save elzup/e326e68d62780b30616e to your computer and use it in GitHub Desktop.
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 './lib/TwistOAuth.php'; | |
//endpoint https://api.twitter.com/1/account/generate.json | |
$num = 19; | |
$sn_base = '****'; | |
$password = "****"; | |
$shift = 1; | |
// 既存の | |
$my_sn = '****'; | |
$my_pw = '****'; | |
// gmail ID | |
$mail_base = '****'; | |
try { | |
$to = TwistOAuth::login('RwYLhxGZpMqsWZENFVw', 'Jk80YVGqc7Iz1IDEjCI6x3ExMSBnGjzBAH6qHcWJlo', $my_sn, $my_pw); | |
for ($i = 1 + $shift; $i <= $num + $shift; $i++) { | |
$request = $to->post('https://api.twitter.com/1/account/generate.json', | |
array('screen_name' => $sn_base . $i, | |
'password'=>$password, | |
'email'=>$mail_base . '+hhoge' . $i . '@gmail.com', | |
'name'=> $sn_base . rand(), | |
'protected'=>true | |
)); | |
} | |
print_r($request); | |
print $request->screen_name." Created".PHP_EOL; | |
} catch (TwistException $e) { | |
print $e->getMessage().PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment