$value) { $_SESSION[$key] = $value; } $_SESSION['__SINA']['TOKEN'] = $token; }else{ die( 'REST API ERROR!' ); } $_SESSION['expiresTime'] = time() + $token['remind_in']; $_SESSION['__SINA']['TOKEN'] = $token['access_token']; $_SESSION['uid'] = $token['uid'] ; $uid=$_SESSION['uid']; if( $_SESSION['backUrl'] ){ if( strpos( $_SESSION['backUrl'] , '?' ) === false ){ $backUrl = $_SESSION['backUrl'].'?viewer='.$_SESSION['uid']; }else{ $backUrl = $_SESSION['backUrl'].'&viewer='.$_SESSION['uid']; } header("Location: ".$backUrl ); }else{ header('Location: http://'.$_SERVER['HTTP_HOST'].'/'); } } }else{ die( '