I'm using a basic html form with this call:
Now, I use a perl tracking script for my referrers that attaches a cookie. Right now, I'm using a program that someone made that works like this.
I link to a script say [login to view URL] that has this coding:
#!/usr/bin/perl
require('/home/[login to view URL]');
$SECUREURL = '[login to view URL]';
$MyCk = CookieGet($CookieID);
if ($MyCk eq "1" && $Cookies{$CookieID} ne "") {
$Referrer = $Cookies{$CookieID};
$Referrer =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
} elsif ($MyCk eq "1" && $Cookies{$CookieID} eq "") {
$Referrer = $DefaultID;
} elsif ($MyCk ne "1" && $ENV{'QUERY_STRING'}) {
$Referrer = $ENV{'QUERY_STRING'};
} else {
$Referrer = $DefaultID;
}
if ($Referrer eq "") { $Referrer = $DefaultID; }
$NEWURL = $SECUREURL . '?' . $Referrer;
print "Location: $NEWURLnn";
exit(0);
Now, it refers to a file named [login to view URL], which it's code says this:
#!/usr/bin/perl
require('/home/[login to view URL]');
$ORDERFORM = '/home/[login to view URL]';
print "Content-Type: text/htmlnn";
if ($ENV{'QUERY_STRING'}) {
$Referrer = $ENV{'QUERY_STRING'};
$Referrer =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
} elsif (CookieGet($CookieID) && $Cookies{$CookieID} ne "") {
$Referrer = $Cookies{$CookieID};
} else {
$Referrer = $DefaultID;
}
if ($Referrer eq "") { $Referrer = $DefaultID; }
open(ORDER, "$ORDERFORM") || print "Unable to open Order Form for reading: $!nn";
@File=();
close(ORDER);
foreach $line (@File) {
if ($line =~ /<FORM/gi) {
print $line . "nn";
} else {
print $line;
}
}
exit(0);
Now, what it does is places this line of coding into the html page, which is what I want as I already have configured my php script to collect it:
What I need is that coding to be converted into php and placed into the php script I'm using to send the html form. That way when the page is submitted, part of the scripts job is to collect the cookie code from the customer's computer and paste it into the email along with the rest of the data sent in the form.
Can anyone give me a bid?
Thanks
Curtis
How long have you wanted to convert this script? When you are ready to convert the script, choose my bid and we can get started. Only when you are ready.