Re: [PHP3] cookies
| From: | moshe | Date: | Mon, 19 Jun 2000 17:33:17 +0000 |
| Subject: | Re: [PHP3] cookies | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2213@lists.php.net to get a copy of this message | ||
may this exemple help u:
$cmd1 = "POST /xxx.html HTTP/1.1\r\n";
$cmd2 = "Content-Type: application/x-www-form-urlencoded\r\n";
$cmd3 = "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98;
DigExt)\r\n";
$cmd4 = "Host: xxx.xxx.xxx.xxx\r\n";
$cmd5 = "Content-Length: 18\r\n";
$cmd6 = "Connection: Keep-Alive\r\n\r\n";
$cmd7 = "";//"Cookie: $cookie\r\n\r\n";
$cmd8 = "t6z6\r\n\r\ncriteria=%E1%F8%F7";
$command = $cmd1 .$cmd2 .$cmd3 .$cmd4 .$cmd5 .$cmd6 .$cmd7;//. $cmd8;
$fp = fsockopen("xxx.xxx.xxx.xxx", 80, &$errno, &$errstr, 10);
if(!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
debuginfo("OPEN SOCKET");
fputs($fp,$command);
fputs($fp,$cmd8);
while ($line = fgets($fp,4096)){$string.=$line;}
fclose($fp);
}