Is it possible in PHP to edit another users session other than the current user? If so how?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
It is possible to edit another users session in php through couple of ways:
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;
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;
回答2:
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.