# Cookike problem

**URL:** <https://forum.kirupa.com/t/cookike-problem/123180>\
**Category:** Uncategorized\
**Created:** [September 21, 2004, 9:12am UTC](https://forum.kirupa.com/t/cookike-problem/123180 "2004-09-21T09:12:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![narko](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@narko](https://forum.kirupa.com/u/narko)\
**Post date:** [September 21, 2004, 9:12am UTC](https://forum.kirupa.com/t/cookike-problem/123180/1 "2004-09-21T09:12:20Z")

</div>

I’m faced with the cookie problem.  
we’re using setcookie() on the domain [www.example.com](http://www.example.com)  
but in fact I need to setup cookies for [example.com](http://example.com) domain.  
so, I use the following syntax (due to php manual):  
setcookie(‘surferid’, 10, 0, ‘/’, ‘.example.com’);  
This way we hope to set cookies for all [example.com](http://example.com) subdomains.  
But anyway I can’t read cookie.
