I have Viber bot. I want to save my id's. But file_put_content
save all data. I just want user.id
.
And also it's repeating ids. So I want just to save user.ids
and not to repeat them.
file_put_contents("azer1.txt", file_get_contents("php://input"));
$viber = file_get_contents("azer1.txt");
$viber = JSON_decode($viber);
My Answer:
'ids.txt', $user_id . PHP_EOL, FILE_APPEND);
Rate this post
5 of 5 based on 1480 votesComments