Question:What will be the output of the following?
<?php
$http=fsockopen("www.example.com",80);
$req="GET / HTTP/1.1\r\n";
$req.="Host:www.example.com\r\n";
$req.="Connection: Close\r\n\r\n";
fputs($http,$req);
while(!feof($http)){
echo fgets($http,1024);
}
fclose($http);
?>
A HTTP/1.0 302 Moved Temporarily Location:http://www.iana.org/domains/example/ Server: BigIP Content-Length: 0 X-Cache: MISS from proxy1.apcbd.com X-Cache-Lookup: MISS from proxy1.apcbd.com:3128 Via: 1.0 proxy1.apcbd.com:3128 (squid/2.7.STABLE6) Connection: close
B HTTP/1.0 302 Moved Temporarily Location: http://www.iana.org/domains/example/ Server: BigIP Content-Length: 0 X-Cache: MISS from proxy1.apcbd.com X-Cache-Lookup: MISS from proxy1.apcbd.com(squid/2.7.STABLE6) Connection: close
C Server: BigIP Content-Length: 0 X-Cache: MISS from proxy1.apcbd.com X-Cache-Lookup: MISS from proxy1.apcbd.com:3128 Via: 1.0 proxy1.apcbd.com:3128 (squid/2.7.STABLE6) Connection: close
D HTTP/1.0 302 Moved Temporarily Location: http://www.iana.org/domains/example/ Server: BigIP Content-Length: 0 X-Cache: MISS from proxy1.apcbd.com X-Cache-Lookup: MISS from proxy1.apcbd.com:3128 Via: 1.0 proxy1.apcbd.com:3128 (squid/2.7.STABLE6)