title: Codeigniter Cookies Help
body: <p>Hello in codeigniter how would I check if the user is visiting the site for the first time, and if they are set a cookie?</p>
  
  <p>I am already using the Session library and database sessions which stores the session_id etc, but I need to to be able to check if the user is a first time visitor and if they have a cookie already
  `   </p>
  
  <pre><code>$cookie = array(
                             'name'   =&gt; 'some_value',
                             'value'  =&gt; 'The Value',
                             'expire' =&gt; time()+86500,
                             'domain' =&gt; '.some-domain.com',
                             'path'   =&gt; '/',
                             'prefix' =&gt; '',
                         );
  
          set_cookie($cookie);
          var_dump(get_cookie('some_value'));`
  </code></pre>