php script and cookies?

windows

Guest
ok, 2 things ..... trying to see if this is possible ...

1. can you use PHP to write cookies to the visitors hard drive?

if so, is there a script in which i could do the following:

if the user is a first time visitor, itll write a cookie to the person's computer, then itll pop up a new window, of XbyX dimensions ....

if the user has a cookie from my site, signalling that the user has been to my site before, then the user doesnt popup the new window at all

basically, it only popups the new window on the user's first visit ...

----------------------------------------

2. within that popup page, i would like to use a PHP script to see if the user is using netscape, then itll write to the page whatever message i want (saying you are using netscape, blah blah blah), and probably even a form for them to fill out so that i know how many people use netscape .... (so if i get enough responses, ill work to make it netscape compatible)

is there any scripts that you know of that does this? i cant find anything !yes you can do that. to write cookies look into setcookie() in the the php manual. then use php to check for this cookie by using $_COOKIE['variable'] and if there use javascript to popup a window with a php page inside. then have php find the browser they are using by using $_SERVER['HTTP_USER_AGENT']

but that will give you a big string that you must find the browser agent in.
 
Back
Top