...

View Full Version : The COM problem of converting ASP to PHP



tomyzhen
04-23-2004, 05:20 PM
Hi,

When I converting lines of ASP code:


<% dim keysobjs
dim privkey
dim pubkey
dim seed

Set keysobj= CreateObject("wmrmobjs.WMRMKeys")
keysobj.GenerateSigningKeys privkey, pubkey
seed = keysobj.GenerateSeed()
Response.Write privkey
Response.Write "<br>"
Response.Write pubkey
Response.Write "<br>"
Response.Write seed
%>



To the PHP one:


<?
$com = new COM("wmrmobjs.WMRMKeys");
$com->GenerateSigningKeys($privkey,$pubkey);
$seed = $com->GenerateSeed();

echo "Private key=".$privkey;
echo "<br>";
echo "Public key=".$pubkey;
echo "<br>";
echo "Seed=".$seed;
?>




I can obtain the value of $seed, but the $privkey and $pubkey are null,
kindly check the code for me, thx...

firepages
04-23-2004, 09:10 PM
a total guess would be ...


<?
$array=$com->GenerateSigningKeys($privkey,$pubkey);
print_r($array);
//or
print_r($com);
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum