$oauth_base_text .= urlencode('oauth_timestamp=' . $oauth_timestamp . "&");
 $oauth_base_text .= urlencode('oauth_token=' . $oauth_token . "&");
 $oauth_base_text .= urlencode('oauth_version=1.0&');
 $oauth_base_text .= urlencode('screen_name=' . $screen_name);
 $key = TWITTER_CONSUMER_SECRET . '&' . $oauth_token_secret;
 $signature = base64_encode(hash_hmac("sha1", $oauth_base_text, $key, true));
 $url = URL_ACCOUNT_DATA;
 $url .= '?oauth_consumer_key=' . TWITTER_CONSUMER_KEY;
 $url .= '&oauth_nonce=' . $oauth_nonce;
 $url .= '&oauth_signature=' . urlencode($signature);
 $url .= '&oauth_signature_method=HMAC-SHA1';
 $url .= '&oauth_timestamp=' . $oauth_timestamp;
 $url .= '&oauth_token=' . urlencode($oauth_token);
 $url .= '&oauth_version=1.0';
 $url .= '&screen_name=' . $screen_name;
 $response = engine::curl_get_query($url);
 $user_data = json_decode($response);
 $link = "https://twitter.com/" . $user_data->screen_name;
 if ($_SESSION["request"] > date("U") - 60) {
     $_SESSION["request"] = '';
     if (!empty($user_data->name) && !empty($user_data->screen_name)) {
         if (!empty($_SESSION["user"]["email"])) {
             $query = 'UPDATE `nodes_users` SET `url` = "' . $link . '" WHERE `email` = "' . $_SESSION["user"]["email"] . '"';
             engine::myqsl($query);
             $query = 'SELECT * FROM `nodes_users` WHERE `email` = "' . $_SESSION["user"]["email"] . '"';
             $res = engine::mysql($query);
             $data = mysql_fetch_array($res);
         } else {
             $query = 'SELECT * FROM `nodes_users` WHERE `url` = "' . $link . '"';
             $res = engine::mysql($query);
             $data = mysql_fetch_array($res);