Encerrado

Convert Perl Coding to PHP

Este projeto foi concedido à auraspan para $75 USD.

Obtenha orçamentos gratuitos para um projeto como este
Orçamento
$30 - $100 USD
Total de Ofertas
8
Descrição do Projeto

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 [url removed, login to view] that has this coding:

#!/usr/bin/perl

require('/home/[url removed, login to view]');

$SECUREURL = '[url removed, login to view]';

$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 [url removed, login to view], which it's code says this:

#!/usr/bin/perl

require('/home/[url removed, login to view]');

$ORDERFORM = '/home/[url removed, login to view]';

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

Concedido a:
Habilidades Necessárias

Afim de ganhar algum dinheiro?

  • Defina seu orçamento e o prazo de entrega
  • Sublinhe sua proposta
  • Receba pelo seu trabalho

Contratar freelancers que também ofereça neste projeto

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online