As a matter of fact, on the server side there is no such thing as “raw url”. Only separate parts, as it came to server.
You can build it back together yourself, but actually you don’t need protocol or host parts, as it always are same, but URI. So, you can use $_SERVER[‘REQUEST_URI’] variable.
If you still want to build it, run phpinfo(32); function to see all corresponding variable names