Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this script still working? #42

Open
jaredco opened this issue Aug 7, 2014 · 8 comments
Open

Is this script still working? #42

jaredco opened this issue Aug 7, 2014 · 8 comments

Comments

@jaredco
Copy link

jaredco commented Aug 7, 2014

I've been trying this script but am having trouble with the Login. I am passing my username and password (I verified they are working on the device) but the login keeps failing.

This is my PHP test page :

getSnaps(); echo "2" ; ?>

Any help would be appreciated. Thanks.

@jaredco
Copy link
Author

jaredco commented Aug 7, 2014

Thanks for responding. I added an echo "fail" in Login in "snapchat.php" and it does display.   If it should work I will do more debugging to see why it fails.Thx, Steve Sent from my BlackBerry Z30 From: OlaRingdalenSent: Thursday, August 7, 2014 5:42 PMTo: JorgenPhi/php-snapchatReply To: JorgenPhi/php-snapchatCc: Steven KaderSubject: Re: [php-snapchat] Is this script still working? (#42)Do you have the right path to "snapchat.php"?

—Reply to this email directly or view it on GitHub.

@jaredco
Copy link
Author

jaredco commented Aug 10, 2014

I dug deeper and see that the result being returned is this : "{"message":"The network you are connected to has been temporarily blocked because of suspicious activity","status":403,"logged":false}

Snapchat seems to have blocked the IP and not sure if this will go away and/or be recurring.

Anyone else seen this. Thanks for the help.

@jghazally
Copy link

Same issue, tried on a new EC2 Instance, :(

@HSPDev
Copy link

HSPDev commented Aug 21, 2014

I'm pretty sure the block is temporary. It could be that someone else has been spamming from the Amazon network.

I wrote a bot last night, and had it run every minute. That was SO stupid! Now the free server I used is blocked.

BUT I think I have a fix, that seems to be working. Intercept the login call, where the auth token is stored, and save the auth token for maybe 12 hours at a time, or just until it starts failing. That seems to fix the issue. Also add random delays between fetching stuff from their server.
E.g. I'm waiting between 20 and 45 seconds to receive updates from them in each iteration now. That works great!

I might submit a fix to the git repository, for the class itself.

@jaredco
Copy link
Author

jaredco commented Sep 6, 2014

Great. If it is still working could you post the code changes. Not sure what to change to duplicate what you said.
Thanks.

@HSPDev
Copy link

HSPDev commented Sep 6, 2014

I'm already on it. I've made a patched version and updated the readme with an example on how to do this at https://github.com/HSPSoftware/php-snapchat

Please note that you might still get blocked if you hammer them with thousands of requests, but this should at least help you not get blocked as easily, as it won't log you in over and over again.
I don't know when the auth key will expire, but as soon as it does (isLoggedIn returns false afterwards) I would attempt to log in again with the normal password. But as far as I can tell, it has no expiration.
(They might make it trickier now that I've updated the library to avoid their bot detection, as I think they relied heavily upon detecting the constant logins).

Will send a merge request to get the new code and examples into the main repository.

@jaredco
Copy link
Author

jaredco commented Sep 6, 2014

Great...thanks for the help.

On Sat, Sep 6, 2014 at 11:51 AM, Henrik Pedersen [email protected]
wrote:

I'm already on it. I've made a patched version and updated the readme with
an example on how to do this at
https://github.com/HSPSoftware/php-snapchat

Please note that you might still get blocked if you hammer them with
thousands of requests, but this should at least help you not get blocked as
easily, as it won't log you in over and over again.
I don't know when the auth key will expire, but as soon as it does
(isLoggedIn returns false afterwards) I would attempt to log in again with
the normal password. But as far as I can tell, it has no expiration.
(They might make it trickier now that I've updated the library to avoid
their bot detection, as I think they relied heavily upon detecting the
constant logins).

Will send a merge request to get the new code and examples into the main
repository.


Reply to this email directly or view it on GitHub
#42 (comment)
.


Steven Kader | CEO | The Jared Company http://jaredcompany.com

Follow me on Twitter : http://twitter.com/StevenKader

Email: [email protected]

@Chris-Pr
Copy link

print_r($array);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants