There is some way to make this code work:
<script>
function getBaseURL() {
// obtenemos el hash
var jash = window.location.hash;
// lo imprimimos
return jash;
}
</script>
<?php
$url1 = "<script>getBaseURL();</script>";
$url = $url1
echo $url ;
?>
I clarify what I use to get the current url that contains something like this
http://localhost/prueva.php?#access_token=EAALhZB1GcFMUBAIk7fEyHjQUT6wb0N
The problem is the #
sign using window.location.hash
of javascript
I get what I'm looking for but I can not pass it to php
I'm looking for a way to save the result of the jash variable in javascript. In PHP variable $ url .
I hope some help thanks