FindLaw | Find a Lawyer. Find Answers.
Are you a legal Professional?
My current location:
,
| Change location
#! /usr/bin/perl
##############################################
#
# Fred Kuu 11/12/2002
# This sets the appropriate cookies when users pick the state/metro
#
##############################################
use CGI;
use CGI::Cookie;
use strict;
my $form=new CGI;
my %cookies=fetch CGI::Cookie;
my $msa=$form->param('msa_id');
my $state="none";
my $zip="00000";
open F, "/home/httpd/cgi-bin/ads/msa_q203/metroZipCounty.tab";
while () {
split /\t/;
if ($_[0] eq $msa) {
($state)=($_[1]=~/, ([A-Z]+)/);
$zip=$_[2];
last;
}
}
my $msa_cookie=new CGI::Cookie( -name => "fl_msa",
-value=>"$msa",
-expires=>"+1y",
-path=>"/",
-domain=>".findlaw.com");
my $st_cookie=new CGI::Cookie( -name=>"fl_st",
-value=>"$state",
-expires=>"+1y",
-path=>"/",
-domain=>".findlaw.com");
my $z_cookie=new CGI::Cookie( -name=>"fl_z",
-value=>"$zip",
-expires=>"+1y",
-path=>"/",
-domain=>".findlaw.com");
my $exp_cookie=new CGI::Cookie( -name => 'georq_uri',
-value => '',
-path => '/',
-domain => '.findlaw.com',
-expires => '-5y');
my $location;
if (($cookies{'georq_uri'}) and ($cookies{'georq_uri'} !~ /metros\.html/)) {
$location=$cookies{'georq_uri'}->value();
} elsif (($ENV{HTTP_REFERER}) and ($ENV{HTTP_REFERER} !~ /metros\.html/)) {
if ($ENV{HTTP_REFERER} !~ /states_new\.html/) {
$location=$ENV{HTTP_REFERER};
}
else {
$location="http://public.findlaw.com";
}
} else {
$location="http://public.findlaw.com";
}
if (!$msa) {
$msa_cookie->expires('-1y');
$st_cookie->expires('-1y');
}
print CGI::header(-cookie => [$msa_cookie,$st_cookie,$exp_cookie,$z_cookie], -location => $location);
exit;
More Sponsored Services
Wills, Divorce, Incorporation & More - Legalzoom:
Fast and friendly legal document service from LegalZoom, the #1 online legal document service.
Fast and friendly legal document service from LegalZoom, the #1 online legal document service.
USLegalForms.com - Largest Selection of Legal Forms on The Internet:
Download more than 50,000 state-specific legal forms. Real estate documents, power of attorney forms, wills, employment contracts, divorce and separation agreements and much more.
Download more than 50,000 state-specific legal forms. Real estate documents, power of attorney forms, wills, employment contracts, divorce and separation agreements and much more.