Jump to content

html_entity_decode >> simpleXML


rossmurphy

Recommended Posts

So i have this returned from an apicall...

 

$redirectform = '<?xml version="1.0" encoding="UTF-8"?>&#10;<form 
			action="http://<serverip>/ecomgateway/PaymentProcessor" 
			method="post" name="form1">&#10; <input name="returnUrl" type="hidden" 
			value="http://<serverip>/ecom-api/test/neteller41depositresult.jsp"/>&#10; <input name="userPostalCode" 
			type="hidden" value="d8d8d8"/>&#10; <input name="accountId" type="hidden" 
			value="1001"/>&#10; <input name="userFirstName" type="hidden" 
			value="FirstName"/>&#10; <input name="userCity" type="hidden" 
			value="ISDUHFGISDFH"/>&#10; <input name="userEmail" type="hidden" 
			value="[email protected]"/>&#10; <input name="netellerAccount" type="hidden" 
			value="123456789012"/>&#10; <input name="type" type="hidden" 
			value="1"/>&#10; <input name="vendorId" type="hidden" 
			value="NETELLER41"/>&#10; <input name="externalResponseUrl" type="hidden" 
			value="http://<serverip>/ecom-api/parlayegateway.external"/>&#10; <input name="netellerSecureId" 
			type="hidden" value="123456"/>&#10; <input name="userAddress" type="hidden" 
			value="sdighiasdgh"/>&#10; <input name="siteId" type="hidden" value="2"/>&#10; 
			<input name="userPhoneNumber" type="hidden" value="8928928922"/>&#10; 
			<input name="userCountry" type="hidden" value="GB"/>&#10; <input name="userIpAddress" 
			type="hidden" value="192.168.0.247"/>&#10; <input name="userProvince" type="hidden" 
			value="ABE"/>&#10; <input name="userId" type="hidden" value="SIT3"/>&#10; 
			<input name="testMode" type="hidden" value="true"/>&#10; <input name="userLastName" 
			type="hidden" value="LastName"/>&#10; <input name="transactionId" type="hidden" 
			value="100083"/>&#10; <input name="transactionStatus" type="hidden" value="PD"/>&#10; 
			<input name="amount" type="hidden" value="10.0"/>&#10; <input name="currency" 
			type="hidden" value="EUR"/>&#10;</form>&#10';

 

and i use this..

 

$test = html_entity_decode($redirectform);

 

to decode the html entities.... is there any way i can get this into a simple xml array so i can go...

 

$test->form['action'] or $test->form->input['name']

 

??

Link to comment
https://forums.phpfreaks.com/topic/168934-html_entity_decode-simplexml/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.