include_once "../src/snapchat.php"; echo "\n\nUsername: "******"\nPassword: "******"\nEmail: "; $email = trim(fgets(STDIN)); echo "\nBirthday (yyyy-mm-dd): "; $birthday = trim(fgets(STDIN)); echo "\nGmail address: "; $gMail = trim(fgets(STDIN)); echo "\nGmail password: "******"\nYou should have a file called '{$id}' in your snap api folder, unzip it.\n"; echo "9 images. If there is a ghost in a image means 1, if not 0\n"; echo "The result should be like the following one: 110000101\n"; echo "After completion, the zip file will be deleted automatically.\n\n"; echo "\nResult: "; $result = trim(fgets(STDIN)); $result = $snapchat->sendCaptcha($result, $id); unlink(__DIR__ . "{$id}"); if ($result == null) { echo "Account successfully created\n"; echo "\nUsername: {$username}\n"; echo "Password: {$password}\n"; echo "Email: {$email}\n"; } else { echo "There was an error registering your account\n";
$response->message = $result; } else { $result = $snapchat->getUpdates2(); formatSnaps($result, $snapchat); $response->status = OKAY; $response->message = $result; } } else { $response->status = BAD; $response->message = "Please enter a username and a password."; } } else { if ($action == "register") { if (isset($_GET['username']) && isset($_GET['password']) && isset($_GET['email']) && isset($_GET['birthday']) && $_GET['username'] != "" && $_GET['password'] != "" && $_GET['email'] != "" && $_GET['birthday'] != "") { $snapchat = new Snapchat(); $result = $snapchat->register($_GET['username'], $_GET['password'], $_GET['email'], $_GET['birthday']); if ($snapchat->auth_token != "") { $response->status = OKAY; $response->result = $result; $response->message = "Successfully Registered and Logged In."; } else { $response->status = BAD; $response->result = $result; $response->message = $result->message != null ? $result->message : "Please try again."; if ($response->message == "Please upgrade Snapchat to the latest version to create an account.") { $response->message = "Currently, snapchat disabled registration for all iPhone and Android SnapChat Applications with older versions and Snap2Chat is also affected. To temporarily register, please use a friend's iPhone or Android and use it to register an account. I am still trying to solve the problem and really sorry for the inconvenience. "; } } } else { $response->status = BAD; $response->message = "Please enter a username, password and an email.";