Gossamer Forum
Home : General : Perl Programming :

cgi lwptype help

Quote Reply
cgi lwptype help
I have some code like this:

Code:

# Validate the form input..
$status = &validate_record(%in);
my %ok_status = (
200, "OK 200",
201, "CREATED 201",
202, "Accepted 202",
203, "Partial Information 203",
204, "No Response 204",
);
my ($status2, $error) = &check_link ($in{'URL'});
if (!exists $ok_status{$status2}) {
$error =~ /\s(.*)/;
$status2 = "<ul><li>URL ($1) : <b>$status2</b></ul>";
($status eq "ok") ? $status = $status2 : $status .= $status2;
}
if ($status eq "ok") {
What i want it to do is be able to also check a site that redirects and uses head to verify its there instead of just returning a 302 or 301 error code, can someone please help me with this?

------------------
------------------------------------------
Lavon Russell
LookHard! Search
http://www.lh.yi.org
webmaster@lh.yi.org