Advertisement
lamiastella

fixed

Mar 6th, 2017
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1.     $comment_helper = null;
  2.     $comments = [];
  3.     $file = "./1460725204439623926.txt";
  4.     do {
  5.         if (is_null($comment_helper)) {
  6.             $comment_helper = $i->getMediaComments(1460725204439623926);
  7.         } else {
  8.             $comment_helper = $i->getMediaComments(1460725204439623926, $comment_helper->getNextMaxId());
  9.         }
  10.         $comments = array_merge($comments, $comment_helper->getComments());
  11.     } while (!is_null($comment_helper->getNextMaxId()));
  12.     foreach ($comments as $comment) {
  13.          $file_content = $comment->text;
  14.          file_put_contents($file, $file_content."\n", FILE_APPEND);
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement