There is a big problem , when I go into my website with the url www.xxx.com the cookies go into the www.xxx.com and when I go with xxx.com the cookies place is xxx.com meaning that its diffrent from the first one , how can i set and get the cookies so the cookies be set in only one place ?

easier meaning :
url = www.xxx.com , cookies website name = www.xxx.com
url = xxx.com , cookies website name = xxx.com
xxx.com != www.xxx.com

You need to set the domain when you're setting the cookie to include subdomains (including www) of that domain.

setcookie('CookieName', 'Cookie Value', time+3600, '', '.xxx.com');

Note the preceeding period '.' infront of the domain, that is important.