Suppose I set cookie in user browser. like that.
setcookie ("TestCookie", "", time() - 3600);
This cookie contain some secret data.which is usefull for web which create this cookie.
but some other hacker set the cookie like that by urself and access the website.
Can I also check the cookie domain name which create it.
if the domain name is same then the cookie is originol otherwise fake.
I am not quite sure if I know what you mean, but cookies can only be accessed by the domain which set them. Other websites can't access the cookies of your website and your website can't access cookies of other websites.
So if you're afraid that a cracker who has another website could manipulate your cookies, he can't do that, because the browser doesn't send him your cookies.