Help for this page

Select Code to Download


  1. or download this
    use LWP;
    my $url = "oldurl";
    ...
    
    print $res->status_line;
    
  2. or download this
    [xorl@xorlsbox ~/tools]$telnet ourdomainname 80
    Trying xxx.xxx.xxx.xxx...
    ...
    Content-Type: text/html; charset=utf-8
    
    Connection closed by foreign host.
    
  3. or download this
      my $mech = WWW::Mechanize->new();
      $mech->requests_redirectable([]);
      $mech->get($url);
      print $mech->response->code . " " . $mech->response->header("Locatio
    +n");