Jump to content

Recommended Posts

So I have a new company project, our company got these new Card Readers (swipe the card), it reads the sting decodes it with a simple php script, and then it runs a search on the member through an online database.

SO
1. Swipe
2. Decodes & Extracts, Member Number
3. Takes member number, and does FORM ACTION POST Search


Now, this is great!

But I want to go a little further, in the page source of the search field there is the following
[NOTE: I deleted confidential fields]

<!CDX BEGIN>
<!CDX RETURN_CD:0>
<!CDX MBR_ID:1020594>
<!CDX Mbr_Orig_Id:1020594>
<!CDX ASSOC_MBR_ID:>
<!CDX MBRS_PLS_IN:P>
<!CDX MBR_LST_NM:LASTNAMEHERE>
<!CDX MBR_FST_NM:FIRSTNAMEHERE>
<!CDX MBR_MID_INIT_NM:>
<!CDX MBRS_EXPIR_DT:EXPIRYDATEHERE>
<!CDX MBR_SLTN_CD:>
<!CDX MBR_NM_GEN_CD:>
<!CDX MBR_NM_SUFX_CD:>
<!CDX MBR_BSC_AD:ADDRESSOFCUSTOMERHERE>
<!CDX MBR_SUPL_AD:EXTRAADDRESSINFOHERE>
<!CDX MBR_ADR_CTY_NM:CITYOFCUSTOMERHERE>
<!CDX MBR_ADR_ST_PROV_CD:STATOFCUSTOMERHERE>
<!CDX MBR_ADR_PSTL_CD:ZIPCODEOFCUSTOMERHERE>
<!CDX MBR_TEL_NR:PHONENUMBERHERE>
<!CDX MBR_TEL_EXT_NR:>
<!CDX END>

Now like I said earlier this is in HTML Source.

Questions
1. What is this? xml?
2. Can I use this to extract the data with PHP? if so how?

So I would like to say just to give an idea:
$zipcode = $_GETfromFILE['ZIPCODE'];


I hope this makes sense

Any help is going to be very appreciated,
Thank you in advance for your help.
Link to comment
https://forums.phpfreaks.com/topic/12540-php-reading-from-a-source-with-data/
Share on other sites

[img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

I found some information on the Server I'm trying to grab data from and found that the above code is surely XML file.

Now I just have one problem, How in the heck do I parse the XML into the PHP file?

so

$zipcode = MBR_ZIPCODEFROMXML

---------------
Right now I swipe the card, and it gives me an XML file with all the person's info. I want it so that I swipe the card get the xml file through php, query the information and make it available to move on to the next step.

So i can pull there first name, last name, address, and zip and fill them in the FORMS automatically (PLUS MANY OTHER HELPFUL THINGS!!)

----------------

So how do I read XML in PHP? I checked out php.net, that was confusing as hell.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.