Current location: Hot Scripts Forums » Programming Languages » ASP.NET » Urgent need to convert small snippet from perl to asp.net (asp)

Urgent need to convert small snippet from perl to asp.net (asp)

Reply
  #1 (permalink)  
Old 04-20-06, 09:11 AM
hejlsberg hejlsberg is offline
New Member
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Urgent need to convert small snippet from perl to asp.net (asp)

Hello to everyone,

I need some help. I have one piece of code in perl which interacts with executable file - pass some variables and get results back. I don't understand perl and want to convert it to asp.net (or even pure asp). Here is the code:

----------------------------------------------------------
#!/usr/bin/perl

use CGI;

$min=CGI:aram("min");
$cin=CGI:aram("cin");
$invoice=CGI:aram("invoice");
$descr=CGI:aram("descr");
$longdescr=CGI:aram("longdescr");
$total=CGI:aram("total");
$expires=CGI:aram("expires");
$country=CGI:aram("country");
$date=CGI:aram("date");

$urlok="http://www.any_domain.bg/demo/ok.html";
$urlcancel="http://www.any_domain.bg/demo/cancel.html";

$longdescr =~ s/\n/\\n/g;

$qry = "TYPE = REGISTER\n" .
"MIN = $min\n" .
"CIN = $cin\n" .
"INVOICE = $invoice\n" .
"DESCR = $descr\n" .
"LONGDESCR = $longdescr\n" .
"TOTAL = $total\n" .
"EXPIRES = $expires\n" .
"COUNTRY = $country\n" .
"DATE = $date\n" ;

$q_result = `echo -n "$qry" | ./eccli www.epay.bg .`;

chomp $q_result;

if ($q_result eq "Y"){
$urlok=CGI::escape( $urlok );
$urlcancel=CGI::escape( $urlcancel );
print "Location: https://www.datamax.bg/ec/paylogin.cgi?MIN=$min&INVOICE=$invoice&URLOK=$urlo k&URLCANCEL=$urlcancel\n\n";
}
else
{
print "Content type: text/html \n\n
Грешка при изпращане на информацията!
status = $q_result";
}

----------------------------------------------------------

I will deeply appreciate any help placed here.
Many thanks in advance.

Warmhearted Wishes,
Kaloyan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 04-20-06, 02:30 PM
koncept koncept is offline
Community VIP
 
Join Date: Oct 2004
Location: Cleveland Ohio
Posts: 1,791
Thanks: 0
Thanked 0 Times in 0 Posts
i dont understand perl much but if you tell us what the goal of this script is perhaps we can point you in the direction of one already written in asp or asp.net
__________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
- Rich Cook

Please use code tags....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 04-21-06, 01:15 AM
hejlsberg hejlsberg is offline
New Member
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks koncept,

It is related to e-payments. I reckon that will be very difficult to find matching script in asp/asp.net because this system is bulgarian (where i come from) and seems to be not quite compatible with other similar systems and payment gateways over the world (at least these wich i have worked on).

So when we have a deep look in above perl script will see that it interacts with executable file (eccli), passing some variables through $qry and then get back results. The magic key here is how to make it with asp/asp.net.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 04-21-06, 06:56 AM
koncept koncept is offline
Community VIP
 
Join Date: Oct 2004
Location: Cleveland Ohio
Posts: 1,791
Thanks: 0
Thanked 0 Times in 0 Posts
i would try posting in the perl section, someone there maybe able to better explain how the script is working
__________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
- Rich Cook

Please use code tags....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT:: how to solve post method error on asp page in Linux & Apache Server? j14nhAo ASP 2 02-24-06 12:33 PM
Perl Programmer sought for small issue usallsys Job Offers & Assistance 0 03-04-05 07:09 AM
Needed - Someone who can convert asp to php dkaveritt Job Offers & Assistance 3 02-14-05 10:52 AM
2000 MB space - 40GB/month transfer- Asp, ASP.NET, Php,MySQL, MS SQL Firefrog General Advertisements 0 07-29-04 04:54 PM
convert perl code to php phptalk Perl 1 01-15-04 02:06 AM


All times are GMT -5. The time now is 08:45 AM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.