Mar 6, 2012 Replies: 6 Here attached an example of how to encrypt and decrypt using b4a and php. test_xn_crypt.zip is the android application. ws_execute.zip is the php web service. I hope it can be useful. Should you have any question ... Attachments test_xn_crypt.zip test_xn_crypt.zip 2.2 KB · Views: 770 ws_execute.zip ws_execute.zip 1.1 KB · Views: 768 Click to expand...
Here attached an example of how to encrypt and decrypt using b4a and php. test_xn_crypt.zip is the android application. ws_execute.zip is the php web service. I hope it can be useful. Should you have any question ...
Shay Well-Known Member Licensed User Longtime User Jan 13, 2015 #2 Hi Thank you for this code, I adjusted it to work with HttpUtils2 I have problem with PHP code on app, without your code I used this: ExecuteRemoteQuery("action=1&DeviceID=" & DeviceID ,"Post1") Now I am using this: Code: Copy req="action=1&DeviceID=" & DeviceID Enc = GlobalCode.xn_trim_encrypt (req) ExecuteRemoteQuery(Enc ,"Post1") on php server I used: Code: Copy $action=$_POST['action']; $DeviceID=$_POST['DeviceID']; Now I don't know what to do after: $i = xn_trim_decrypt ( file_get_contents ( "php://input" ) ) ; Meaning how to I get $action and $DeviceID from $i
Hi Thank you for this code, I adjusted it to work with HttpUtils2 I have problem with PHP code on app, without your code I used this: ExecuteRemoteQuery("action=1&DeviceID=" & DeviceID ,"Post1") Now I am using this: Code: Copy req="action=1&DeviceID=" & DeviceID Enc = GlobalCode.xn_trim_encrypt (req) ExecuteRemoteQuery(Enc ,"Post1") on php server I used: Code: Copy $action=$_POST['action']; $DeviceID=$_POST['DeviceID']; Now I don't know what to do after: $i = xn_trim_decrypt ( file_get_contents ( "php://input" ) ) ; Meaning how to I get $action and $DeviceID from $i
Shay Well-Known Member Licensed User Longtime User Jan 13, 2015 #3 Ok, I think I figure it, on app I change it to: req="1," & DeviceID on php I am doing: Code: Copy $a = explode(",", $i); $action=$a[0]; $DeviceID=$a[1];
Ok, I think I figure it, on app I change it to: req="1," & DeviceID on php I am doing: Code: Copy $a = explode(",", $i); $action=$a[0]; $DeviceID=$a[1];
stefanobusetto Active Member Licensed User Longtime User Jan 14, 2015 #4 You can start from here: http://php.net/manual/it/function.parse-url.php
Shay Well-Known Member Licensed User Longtime User Jan 14, 2015 #5 Hi Thanks Can you provide the class also for B4i?
Shay Well-Known Member Licensed User Longtime User Jan 14, 2015 #7 :-( after I make this to work... do you have some example for doing the same with SSL?