XML Response Help Needed :(
A Salute to all the dynamic drive members,
I am a PHP-MySQL coder. I dont know much of XML. But all of a sudden I am asked to make use of an API and create a working script.
I dont know how to get variables from XML. Kindly help me out. Kindly get me the below response in simple PHP variables also help me learn how you do it.
Here Is What I have to work on :
PHP Code:
http://www.mobikwik.com/recharge.do?uid=<user_id>&pwd=<password>&cn=<cellNumber>&op
=<operator_code>&cir=<circle_code>&amt=<recharge_amount>&reqid=<reqid>
uid : Member Id of retailer registered with mobikwik
pwd : Password of the above retailer.
cn : Cell number to recharge
op : Operator of cell number ( See Appendix)
cir : Circle of cell number ( See Appendix)
amt : Amount to recharge
reqid : Request ID for this transaction. It should be a unique 20 digit number
Sample Request :
http://www.mobikwik.com/recharge.do?uid=hemanta.gupta@gmail.com&pwd=password&cn=98
12312345&op=1&cir=5&amt=50&reqid=12544172981250
Sample success response:
<recharge>
<status>SUCCESS</status>
<txId>12544172981250</txId>
<balance>1000</balance>
<discountprice>980</discountprice>
</recharge>
txId : Indicates transaction id returned by mobikwik.
balance : Indicates current Mobikwik balance of the user.
With Regards