#! /usr/bin/perl
###############################################################################
#
# $Id: fetchurl,v 1.1.1.1 2003/04/21 15:30:49 bcwhite Exp $
#
# Example on how to load any arbitrary file using a URL specification.
#
# Written by Brian C. White <bcwhite@pobox.com>.
# This example code has been placed in the public domain.
#
###############################################################################



# Bring on the workhorse.
use Ferret;


# Check the parameter list
die "Use: $0 <url>\n" if @ARGV != 1;


# Get the URL given on the command line and run it through one of the standard
# filters if the extension is of a known types (the second argument -- "1");
my($file,$head);
$file = Ferret::LoadURL($ARGV[0],\$head,1);


# Display the final result
print STDERR $head,"\n";
print $file;
