Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
Exit if account has problems
Browse files Browse the repository at this point in the history
  • Loading branch information
mgp25 committed Sep 2, 2015
1 parent 3d6a186 commit c6c584b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/snapchat_agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ public function post($endpoint, $data, $params, $multipart = FALSE, $debug = FAL

if($endpoint == "/loq/login" || $endpoint == "/all_updates")
{
if (strpos($result,'401 UNAUTHORIZED') !== false)
{
echo "\nRESULT: 401 UNAUTHORIZED\n";
exit();
}

$jsonResult = json_decode($result);
echo 'RESULT: ' . print_r($jsonResult) . "\n";
if (property_exists($jsonResult, "status") && $jsonResult->status == '-103')
Expand Down

0 comments on commit c6c584b

Please sign in to comment.