How to get the real address from a url (permalink)

have you looked at $_SERVER

 $real_address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
 echo $real_address;

This code grabs your url with it’s parameters and saves it to the $real_address variable

Also have a look at this link here

techhipbettruvabetnorabahisbahis forumutaraftarium24edueduseduedusedueduseduedusedusedus