Forum Moderators: coopster

Message Too Old, No Replies

setting cookies with php like javascript

         

bwstyle

10:47 pm on Nov 20, 2006 (gmt 0)

10+ Year Member



This may sound funny if I'm looking at it the wrong way.

I'd like to set up a system with a similar architecture to google analytics: One include file is hosted on a system and all clients need to do is make an external call in their header to include tracking information. This file will set a cookie for the client's domain.

I don't have a problem setting this cookie for a client domain with javascript with this type of architecture, but I can't seem to get a PHP cookie set for the client domain. It appears as a cookie for the domain hosting the file.

Is there a way to do this in PHP?

barns101

10:16 am on Nov 21, 2006 (gmt 0)

10+ Year Member



As far as I am aware, PHP can only set a cookie for the domain that is hosting the file.

bwstyle

4:06 pm on Nov 22, 2006 (gmt 0)

10+ Year Member



Looks like you're right. That's what I suspected. Thanks!