hoangthi Posted June 8, 2013 Share Posted June 8, 2013 This is their (Perfect Money) example: https://perfectmoney.com/acct/samples/parse_spend.txt This my function: Unfortunately, It doesn't work, I need your help. Thanks so much. <?php $_acct = "U9876543"; // My account $PerfectMoney = "U1234567"; // Receiver account $payout = "0.03"; //Amount $_paymemo = "Something"; //Memo _MakeSpend($_acct,$_acct_pass,$PerfectMoney,$payout,$_paymemo); //new version - RETURN BATCH NUMBER!!! function _MakeSpend($from, $to, $amount, $memo) { $f=fopen('https://perfectmoney.is/acct/confirm.asp?AccountID=1234567&PassPhrase=abcxyz&Payer_Account=$from&Payee_Account=$to&Amount=$amount&PAY_IN=1&Memo=$memo&PAYMENT_ID=1223', 'rb'); if($f===false){ echo 'error openning url'; } // getting data $out=array(); $out=""; while(!feof($f)) $out.=fgets($f); fclose($f); // searching for hidden fields if(!preg_match_all("/<input name='(.*)' type='hidden' value='(.*)'>/", $out, $result, PREG_SET_ORDER)){ echo 'Ivalid output'; exit; } $ar=""; foreach($result as $item){ $key=$item[1]; $ar[$key]=$item[2]; } return $ar; } ?> PS: I am Php newbie, If you can. Please help me to write new function name: _MakeSpend Once Again, Thanks Link to comment https://forums.phpfreaks.com/topic/278923-about-tranfering-perfect-money-system/ Share on other sites More sharing options...
hoangthi Posted June 8, 2013 Author Share Posted June 8, 2013 Please, who can help me Link to comment https://forums.phpfreaks.com/topic/278923-about-tranfering-perfect-money-system/#findComment-1434839 Share on other sites More sharing options...
mac_gyver Posted June 8, 2013 Share Posted June 8, 2013 It doesn't work since you forgot to tell anyone what "it doesn't work" means, we cannot help you. we don't have an account to try ourself and it would be unwise for you to give anyone here access to your actual account, so you are the only person here who can run your code and observe what result it produces. but if you don't communicate what result your code produced, you are on your own with this problem. Link to comment https://forums.phpfreaks.com/topic/278923-about-tranfering-perfect-money-system/#findComment-1434840 Share on other sites More sharing options...
hoangthi Posted June 8, 2013 Author Share Posted June 8, 2013 actually, I just want to make a function which is based on this code : https://perfectmoney.com/acct/samples/parse_spend.txt but not successful.... $f=fopen('[url="https://perfectmoney.is/acct/confirm.asp?AccountID=myaccount&PassPhrase=mypassword&Payer_Account=U987654&Payee_Account=U1234567&Amount=1&PAY_IN=1&PAYMENT_ID=1223"]https://perfectmoney.is/acct/confirm.asp?AccountID=myaccount&PassPhrase=mypassword&Payer_Account=U987654&Payee_Account=U1234567&Amount=1&PAY_IN=1&PAYMENT_ID=1223[/url]' I have variables: myaccount, mypassword, payer account.... and I want to make a function to fill in the link Link to comment https://forums.phpfreaks.com/topic/278923-about-tranfering-perfect-money-system/#findComment-1434842 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.