开发者

Edit another users session in PHP

Is开发者_Python百科 it possible in PHP to edit another users session other than the current user? If so how?


It is possible to edit another users session in php through couple of ways:

  1. 1st way is to you have to get SessionID of the user for which you want to edit session;

    session_id($SessionID);
    
    // and then enter code your logic to change session data here;
    
  2. If you are storing your session data in database then it would be even easier to manipulate data directly in database which would update user session when application will request data again.

Remember you can play with user session up to any level the only thing required is SESSION_ID. If you got that you won the game;


It depends on method which server use to store the session data. I think there maybe a few ways to store like database, files on server, memcache server. so you have to use a proper way.

anyway I've done web programming just for 5 months. so I'm not sure what I said.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜