array( '_token' => $matches[1], 'email' => $email, 'password' => $password ) )); // custom user agent so Tadah staff/server doesn't block us or IP poison us curl_setopt($ch, CURLOPT_USERAGENT, 'cURL/TadahFederation v1 - github.com/PlaceholderLabs/TadahFederation'); $login_result = curl_exec($ch); /////////////// end of login request /////////////// /////////////// start of account info fetching /////////////// // Attempt to visit the dashboard, now that we're logged in (this should tell us info like our username, and if we're banned) curl_setopt($ch, CURLOPT_URL, 'https://tadah.rocks/my/dashboard'); // disable POST, we're not sending any data anymore curl_setopt($ch, CURLOPT_POST, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // fetch the site's HTML $result = curl_exec($ch); curl_close($ch); /////////////// end of account info fetching /////////////// // return results return $login_result; } }