Skip to content

Instantly share code, notes, and snippets.

@alea12
Forked from okumin/pigeon.php
Last active December 15, 2015 11:39
Show Gist options
  • Save alea12/5254738 to your computer and use it in GitHub Desktop.
Save alea12/5254738 to your computer and use it in GitHub Desktop.
<?php
$target = "";
$timestamp = date('Y-m-d hms');
$next_cursor = -1;
$f = fopen($target . " - " . $timestamp . ".txt", "w");
while($next_cursor != 0) {
$api = "https://api.twitter.com/1/followers/ids.xml?cursor=" .
$next_cursor . "&screen_name=" . $target;
$res = simplexml_load_file($api);
foreach ($res->ids->id as $v) {
fwrite($f, $v . "\n");
}
$next_cursor = $res->next_cursor;
}
fclose($f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment