#!/usr/bin/perl -w use strict; print(IOSockGET()) and exit; sub IOSockGET { use IO::Socket; my($mth) = 'GET'; my($rfr) = 'http://www.foo.com'; my($ua) = 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1) Gecko/20020826'; my($hst) = q[atrixnet.com]; my($doc) = q[/robots.txt]; my($sok) = IO::Socket::INET->new ( 'PeerAddr' => $hst, 'PeerPort' => 443, 'Proto' => 'tcp', 'Type' => SOCK_STREAM, 'TimeOut' => 5, ) or die('

Error: Unable to connect to search server

'); print $sok <<__headers__; $mth $doc HTTP/1.0 Host: $hst Referer: $rfr User-Agent: $ua __headers__ my(@output) = <$sok>; close ($sok); return(@output); }