How i get the code from this url in a variable?
http://www.site.com/#code=123
I tried this:
if (isset($_GET['code'])){
$code = $_GET['code'];
}
But the api returns a # instead of & or ?
I found a way with javascript thanks everybody
<script>
var hash = false;
checkHash();
function checkHash(){
if(window.location.hash != hash) {
hash = window.location.hash;
processHash(hash);
} t=setTimeout("checkHash()",400);
}
function processHash(hash){
window.location.href = "code.php?code=" + hash.substr(7);
}