is it possible to add a cookie in the header(the fputs-function in the code below) when you make a socket connection?
$fp = fsockopen ("localhost", 80, $errno, $errstr, 30);
fputs ($fp, "GET /index.php HTTP/1.0\r\nHost: localhost\r\n\r\n");
fclose ($fp);