Reply to perl cgi vs php

Your name:

Reply:


Posted by philip.kingsten on 01/21/08 21:20

Hello phpers,

I have a task I want to carry out in php 4.3 rather than perl 5.6.
Maybe you people can help me?
What I need to do is to catch a URL on a linux box htpp://IP/something?LinkId=1234
then I want to pop up a form to prompt for username and password.
then I need to do a MD5 hex hash ie 'test' gives
5f4dcc3b5aa765d61d8327deb882cf99
then I want the browser to point to https://IP/something?LinkId=1234&name=xxx&password=MD5hash

I have very nearly done this in perl

Like so:
use Digest::MD5 qw(md5 md5_hex md5_base64);
my $LinkId = param( 'LinkId' );
print header,
start_html('Enter Logon Details'),
h1('Enter Details'),
# h1($CustomerId),
start_form (-action => "http://195.168.1.21//cgi-bin/tool3.cgi", -
method=>'GET'),
"What's your name? ",textfield('name'),p,
"What's your password? ",password_field('password'),p,
hidden(-name => "LinkId", -default => '$LinkId').
submit,
end_form,
hr;

That actually works, but the tool3.cgi although it has the 3 variables
populated as required password, the MD5 hash, username and LinkId and
I can build the https URL as required I cannot get the redirect to
work.

I either get an unhelpful error message cannot execute tool3.cgi or
nothing happens.

So I would like you php people to give me some help - cos it is after
9 pm in the UK and this is supposed to be deployed tomorrow morning
1st thing. As much help as you wish - from nothing cos you think I
should read the manual and browse the tutorials (quite right too- I
will when I get some time) or few pointers to get me started or maybe
even some code ...

Thanks in anticipation ;-)

Phil

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация