forked from siputra12/Try
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathliketl.php
71 lines (68 loc) · 2.52 KB
/
liketl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
####Copyright By Janu fb.com/lastducky####
####Thanks For Indra Swastika(fungsi.php)####
####Change This Copyright Doesn't Make You a Coder :) ####
#######EDIT THIS AREA#########
#######END OF EDIT AREA########
require_once('func.php');
echo "Username?\nInput : ";
$username = trim(fgets(STDIN));
if (!file_exists("$username.ig")) {
echo "Password?\nInput : ";
$password = trim(fgets(STDIN));
$log = masuk($username, $password);
if ($log == "data berhasil diinput") {
echo "Berhasil Input Data, silahkan jalankan ulang\n";
} else {
echo "Gagal Input Data";
}
} else {
$gip = file_get_contents($username.'.ig');
$gip = json_decode($gip);
echo "Hai, $gip->username [".$gip->id."] Klik Enter Untuk Melanjutkan..";
$skip = trim(fgets(STDIN));
echo "Jeda Per Sesi?\nInput : ";
$jeda = trim(fgets(STDIN));
if($jeda<60){
echo "Waktu telah diatur 60 detik, karena waktu yang ada masukan rentan terhadap keamanan akun.\n";
$jeda = 60;
}
$cekuki = instagram(1, $gip->useragent, 'feed/timeline/', $gip->cookies);
$cekuki = json_decode($cekuki[1]);
if ($cekuki->status != "ok") {
$ulang = masuk($gip->username, $gip->password);
if ($ulang != "data berhasil diinput") {
echo "Cookie Telah Mati, Gagal Membuat Ulang Cookie\n";
} else {
echo "Cookie Telah Mati, Sukses Membuat Ulang Cookie\n";
}
} else {
$data = file_get_contents($gip->username.'.ig');
$data = json_decode($data);
echo "Mencari Post di timeline...<br/>";
$mid = instagram(1, $data->useragent, 'feed/timeline/?min_id=', $data->cookies);
$mid = json_decode($mid[1]);
for($a=1;$a<5;$a++):
foreach ($mid->items as $media) {
$has_liked = $media->has_liked;
if($has_liked == False) {
//************* Like/Unlike Media ****************
$user = " @". $media->user->username;
$like = instagram(1, $data->useragent, 'media/' . $media->pk . '/like/', $data->cookies, generateSignature('{"media_id":"' . $media->pk . '"}'));
$like = json_decode($like[1]);
echo "Sudah Like @" . $media->user->username . "\n";
}else{
echo "kan udah Like @" . $media->user->username . "\n";
}
}
if($a%3==0){
echo "Menunggu $jeda Detik Untuk Sesi Berikutnya.\n";
sleep($jeda);
}
endfor;
}
flush();
ob_flush();
}
echo "<br>Proses selesai :D<br/>";
?>