How to get complete current URL in php

<>

This question already has an answer here:

Answers


Because of # in the URL you are getting blank in the S_GET or $_SERVER.

You can get it from Javascript like this:

var hash = window.location.hash;

The part of the url after the hash (#) is the fragment identifier:

Fragments depend on the document MIME type and are evaluated by the client (Web browser). Clients are not supposed to send URI-fragments to servers when they retrieve a document, and without help from a local application (see below) fragments do not participate in HTTP redirections

This is why you do not see these parameters in your server side code. You need to pass these parameters by javascript through another http call to the server as post or get parameters.

In javascript you can use location.hash to access the fragment identifier, but unless you use some js library, you need to parse its content yourself.


Need Your Help

getting user info google plus api

login google-plus

How can I get public info of a user from google plus login button integrated on the site, here is the code which is giving me email, I need more info which is provide by google plus :