Closed manguon closed 4 years ago
First, I allow to save in cache multiple instagram sessions : https://github.com/pgrimaud/instagram-user-feed/commit/3acdcd172d4ea743fb2b3455ccfa9af50b922f8f (previously it was not possible, only one session was saved in cache).
Then I added an example for using proxies here : https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/using-proxies.php
$client = new Client([
'proxy' => [
'https' => '91.209.25.156:8080'
]
]);
$api = new Api($cachePool, $client);
$api->login('login', 'password');
// do what you want with this proxy and this instagram account
I found the proxy here : http://www.freeproxylists.net/?c=&pt=&pr=HTTPS&a%5B%5D=0&a%5B%5D=1&a%5B%5D=2&u=90
Then you just have to implement you own strategy to :
Thanks for your support.
Is there a way to declare proxy in credentials.php file? (Then, each login time, use the variable <$proxy> to call the proxy)
ex:
$client = new Client([
'proxy' => [
'https' => $proxy
]
]);
$api = new Api($cachePool, $client);
$api->login('login', 'password');
The credentials file is modular. I created it only for the examples, so you cant change it without any problem.
You also can create an array with all the credentials like that :
<?php
$credentials = [
[
'login' => 'username1',
'password' => 'passwd',
'proxy' => '1.2.3.4:1234',
],
[
'login' => 'username2',
'password' => 'passwd',
'proxy' => '1.2.3.5:1235',
],
...
];
$user = $credentials[rand(0, count($credentials) - 1)];
print_r($user);
I will select a random user in this array
On version 6.3, it works very well.
Thank you very much @pgrimaud
Hi everybody
Instagram can lock or restrict login at any time.
So I want to use multiple accounts in combination with proxies.
Suppose, I have the following proxies:
And the following Instagram accounts: [[USERNAME / PASSWORD]]
All accounts have the same password (passwd).
@pgrimaud How can I use proxies in combination with accounts in credentials.php file (examples folder)
Thank you so much !