Aaron not to be able to answer all your questions but a constant is a
variable that does not change hence why they call it a constant variable.
So in answer to you there
<cfif isDefined('Varaible') />
Would check for the existance of that variable, the other way is
<cfparam name="Variable" default="hello" />
This would also check the existance of a variable, but it will assign it a
default value as well.
Now I am sure cyba_sha1 is a MD5 hashing encryption so you might look at the
function has on coldfusion.
Not sure what this does
A = array(1732584193, 4023233417, 2562383102, 271733878, 3285377520);
list(a,b,c,d,e)=A; so can't answer you there.
and strpad you might go to udf.com I think it is for string manipulation
code.
On 11/10/06, Aaron Roberson <[EMAIL PROTECTED]> wrote:
>
> My merchant/payment gateway only supports php, asp, jsp and perl so I
> am trying to convert a php script into ColdFusion but I am having a
> hard time finding ColdFusion equivalents to some of the functions the
> script uses.
>
> Here are the functions and how they are used in the script:
>
> str_pad()
> USAGE:
> ipad = str_pad("", 64, Asc(0x36)); // I converted chr() to Asc()
>
> intval()
> USAGE:
> intval(i/20) // i is a counter/incremented in a for loop
>
> pack()
> USAGE:
> function cybs_sha1($in) {
> return pack ("H*", sha1 ($in));
> }
>
> list()
> A = array(1732584193, 4023233417, 2562383102, 271733878, 3285377520);
> list(a,b,c,d,e)=A;
>
> defined()
> I am asuming that defined() is deferent than ColdFusion's isDefined()
> since the PHP manual says that defined() is for checking the existance
> of a constant and isset() checks to see if a variable exists. I'm not
> sure what the difference between a variable and a constant is, what's
> a constant?
>
> Also, I don't know what the following operators are:
> ^
> <<
> >>
> and what do I use instead of
> ..=
>
> The merhcants php script is a function library so I am just placing
> everything into <cfscript>. I also attached the working file that I am
> converting just in case it helps.
>
> Thanks for your help,
> Aaron
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259855
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4