Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $comment_helper = null;
- $comments = [];
- $file = "./1460725204439623926.txt";
- do {
- if (is_null($comment_helper)) {
- $comment_helper = $i->getMediaComments(1460725204439623926);
- } else {
- $comment_helper = $i->getMediaComments(1460725204439623926, $comment_helper->getNextMaxId());
- }
- $comments = array_merge($comments, $comment_helper->getComments());
- } while (!is_null($comment_helper->getNextMaxId()));
- foreach ($comments as $comment) {
- $file_content = $comment->text;
- file_put_contents($file, $file_content."\n", FILE_APPEND);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement