English 中文(简体)
不使用 cookie 或 URL 会话 id, 但不在数据库中匹配浏览器指纹的本地会话 。
原标题:codeigniter php native sessions without using cookies or URL session id, but matching browserfingerprints in database

因为荷兰正在严厉适用欧洲隐私法, 并保持我公司网站的用户友好性,

我需要的是一种“重写”本地的php会话课的方法, 这样在本地的班级要求 储存phpsessid的饼干的时候, 我可以把自己的代码放在那里, 检查浏览器的指纹, 并匹配一个会话代号, 我可以用它来恢复本地班的正常工作。

我的想法是:

table sess_fingerprints Fields: fingerprint - phpsessid

function getsessionid()
    {
    $result = $this->db->query("SELECT phpsessid 
                    FROM `sessiondatabase`.`sess_fingerprints` 
                    WHERE `sess_fingerprints`.`fingerprint` =  $userfingerprint ");
    if($result->num_rows() != 0)
        {
        return $result->row->phpsessid;
        }
    }

到了那个时候 本地的php会话代码 和平常一样有效

所以,我的问题是:能否只覆盖phpsession 类的“cookie”部分?如果是的话,如何呢?因为我还没有找到。

我知道能够通过快递等传递会话变量, 但对于我的网络应用程序来说还不够安全。

最佳回答

I think I have found the solution to my problem. I m going to override the functions related to cookies by using http://php.net/manual/en/function.override-function.php

感谢大家一起思考。

问题回答




相关问题
How to suppress/remove PHP session cookie

I need to suppress an already set session cookie header, but I cannot find any way to do this. Why? I need to make an image, sent by a PHP script, cacheable by the end user; this image is used to ...

Remove Cookies from JS or CSS files

Bizarrely my javascript and css files have cookies (says Firebug). I use Zend Framework and I think it has to do with it. Could I change the .htaccess that CSS or JS files don t link to the ZF or is ...

httplib2, how to set more than one cookie?

As you are probably aware, more often than not, an HTTP server will send more than just a session_id cookie; however, httplib2 handles cookies with a dictionary, like this: response, content = http....

cookies control

what tool wold you recommend me to use in order to see what data are stored in my cookies while i m browsing the net. I m a beginner into webdev field(6 months php experience) and i m curious to see ...

热门标签