All pastes #897923 Raw Edit

Untitled

public php v1 · immutable
·published 2008-02-09 22:49 UTC
rendered paste body
<?php$http_request =  "GET / HTTP/1.1User-Agent: Test_Keep-AliveHost: www.apache.orgKeep-Alive: 300Connection: keep-alive";$fs = fsockopen('www.apache.org', 80);fwrite($fs, $http_request);while (!feof($fs)) echo fread($fs, 1024);var_dump($fs);$http_request =  "GET /404 HTTP/1.1User-Agent: Test_Keep-AliveHost: www.apache.orgKeep-Alive: 300Connection: keep-alive";echo "\n\n\n-----(Since Its Keep-Alive, i should be able to submit another request)-----\n";echo "---but none appear---\n";fwrite($fs, $http_request);while (!feof($fs)) echo fread($fs, 1024);var_dump($fs);/*HTTP/1.1 200 OKDate: Sat, 09 Feb 2008 22:36:53 GMTServer: Apache/2.2.8 (Unix)Last-Modified: Thu, 07 Feb 2008 19:26:17 GMTETag: "ea59d1-4382-44596729ac840"Accept-Ranges: bytesContent-Length: 17282Cache-Control: max-age=86400Expires: Sun, 10 Feb 2008 22:36:53 GMTVary: Accept-EncodingKeep-Alive: timeout=5, max=100Connection: Keep-AliveContent-Type: text/html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">....</html>resource(4) of type (stream)-----(Since Its Keep-Alive, i should be able to submit another request)--------but none appear---resource(4) of type (stream)*/?>