#!/usr/local/bin/perl -w #turn on warnings use strict; #always use use LWP::UserAgent; #used for the request use HTTP::Request::Common; #used to build request my ($link,$ua,$req,$results); #declare variables $link = shift; #grab link from standard input $ua = LWP::UserAgent->new; #create new user agent $req = HTTP::Request->new(HEAD => $link);#grab the header $results = $ua->request($req)->as_string; #grab the results print "$results"; #print the header info
In reply to grab HTTP Response and Headers by agent00013
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |