Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow The COM problem of converting ASP to PHP

    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...

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    a total guess would be ...
    PHP Code:
    <?
    $array
    =$com->GenerateSigningKeys($privkey,$pubkey); 
    print_r($array);
    //or
    print_r($com);
    ?>
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •