Jump to content

Reply from API is a string rather than xml


Recommended Posts



I'm calling the API with these $postfields (var_dump output):

array(6) { 
["username"]=> string(6) "<my username>" 
["password"]=> string(32) "<my password>" 
["action"]=> string(17) "getclientsdetails" 
["email"]=> string(23) "<email address>" 
["stats"]=> bool(true) 
["responsetype"]=> string(3) "xml" }


I get this response (var_dump output):

string(3248) " getclientsdetails success 1 1 Jackie Stallard Jackie Stallard Webhive <email address> PO Box 232  Narooma New South Wales New South Wales 2546 AU AU New South Wales Australia 61 0240170244 +61.240170244 0  <string of characters>:xy#D#  1    0  3 Active 0.00      0 0  No Login Logged  3   4 ]]>  ]]> AUD  3 $60.70AUD $0.00AUD  $0.00AUD 3 $60.70AUD 0 $0.00AUD 3 $60.70AUD 0 $0.00AUD 0 $0.00AUD 0 $0.00AUD 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0  "


I asked for xml but this is a string. I'll have a tough time figuring out which field is which. What am I missing?





OK figured it out! I'm sending output to a browser, which is stripping out the xml and leaving only the text!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated