in my php file i have this..

```
if ( isset($_COOKIE['test']) ){
    setcookie("test", "testesttest", time()+3600*24*80);
}

    ob_start();
    echo 'autotrackphpre';
    Header( "HTTP/1.1 301 Moved Permanently" ); 
    header("Location: $url");
ob_flush();

```

it's a redirect when you call the php file..
if you call it first it set the cookie..

But the second time it loads.. the cookie get updated...
that is what i don't want.

If the cookie exists then do nothing.

Gr.