Hi to codeigniter, how would I check if the user first visits the site and if they are set to a cookie?
I already use session libraries and database sessions that store session_id, etc., but I need to check if the user is the first visitor and if they already have a cookie `
$cookie = array(
'name' => 'some_value',
'value' => 'The Value',
'expire' => time()+86500,
'domain' => '.some-domain.com',
'path' => '/',
'prefix' => '',
);
set_cookie($cookie);
var_dump(get_cookie('some_value'));`
source
share