Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8111205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:01:14+00:00 2026-06-06T02:01:14+00:00

login.php <?php define(‘client_id’, ‘cid’); define(‘redirect_uri’, ‘http://domain.tld/file.php’); define(‘client_secret’, ‘secret’); $endpoint = ‘https://accounts.google.com/o/oauth2/auth’; $querystr = array(

  • 0

login.php

<?php
    define('client_id', 'cid');
    define('redirect_uri', 'http://domain.tld/file.php');
    define('client_secret', 'secret');


    $endpoint = 'https://accounts.google.com/o/oauth2/auth';
    $querystr = array(
        'response_type' => 'token',
        'client_id' => client_id,
        'redirect_uri' => redirect_uri,
        'scope' => 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile',
#       'state' => $_SERVER['REQUEST_URI']
    );


    if (isset($_GET['access_token']))
        print_r($_GET);
    else
        header('Location: ' . $endpoint . '?' . http_build_query($querystr));

?>

The above code works fine, the problem I’m having is that the responce I’m getting from Google is not well formed. The query string that I’m getting from them does not start with a question mark ?, it starts with a number sign #. The following is an example returend from Google’s server.

http://domain.tld/file.php#access_token=ya29.AHES6ZABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno&token_type=Bearer&expires_in=3600

Why is it separating the query string from the file path by a number sign? It it because I’m not using a https schema and it’s punishing me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:01:17+00:00Added an answer on June 6, 2026 at 2:01 am

    No. It’s called the “hash” of the URL. For responses from the server to the client (and not vice versa), this is a common scheme. Facebook OAuth 2.0 also uses this technique, for example. Just get used to it, and interpret the response beginning from the hash sign.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application, I am trying to link http://domain.com/accounts/login and /accounts/register to http://domain.com/accounts.php?action=$ where
<form method=POST action=http://www.mypage.com/login.php name=acc> <input value=mylogin name=login size=19 maxlength=30 type=text> <input maxlength=40 type=password size=19
So I have a PHP file that I use to define all my constants
I have an index.php for registration, a login.php as the registration handler. when the
I am doing the folowing on the URL file_get_contents('https://xyz.com/login.php?app_data=%7B%22page%22%3A%22details%22%2C%22id%22%3A%2273%22%2C%22crp%22%3A%221%22%2C%22cip%22%3A%22%22%7D'); but I am receiving it
here is the code <?php session_start(); if(!isset($_SESSION['user_name'])) { header('Location: login.php'); } $conn = mysql_connect(localhost,
I have a PHP login which sets 2 cookies once someone login. The problem
Following is my php login script, There are one problem. If i put any
I'm working on a PHP login/register system, and the login sessions are done using...
I just wrote a PHP login script, and what I'm trying to accomplish is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.