Open browser page depending on XML results
Posted on
16th Feb 2014 07:03 pm by
admin
Hello,
I have some PHP code that sends webbased from data to an external url ( in the form of an XML data stream ) , and gets an XML data stream back.
I've got it displaying the stream via the browser ( using echo $req->getResponseBody(); ).
What I want to do is , instead of displaying the stream, is perform a query on it and redirect the browser to a specific page depending on the match or not.
Using this data (snippit):-
<?xml version="1.0" encoding="utf-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <PerformMLCheckResponse xmlns="webpage">
- <CallResponse>
<AcrService>MoneyLaundering</AcrService>
<AcrSearchId>myid</AcrSearchId>
<AcrReference>refcode</AcrReference>
<AcrIntReference>externalcode</AcrIntReference>
<AcrExtReference>externalcode</AcrExtReference>
<AcrDateTime>2009-10-25T15:15:26.865625+00:00</AcrDateTime>
<AcrAccept>Y</AcrAccept>
<AcrFormatted>Y</AcrFormatted>
<AcrXmlDetail>Y</AcrXmlDetail>
- <AcrResponseDetail>
- <AcdElectoral>
<AerUsed>Y</AerUsed>
<AerValid>Y</AerValid>
<AerPafMatch>Y</AerPafMatch>
<AerForename>David</AerForename>
<AerOthernames />
<AerSurname>Brent</AerSurname>
- <AerAddress>
<AadAbode />
<AadBuilding>22</AadBuilding>
<AadStreet>test town</AadStreet>
<AadLocality />
<AadPostTown>test street</AadPostTown>
<AadPostcode>GU99 1AP</AadPostcode>
</AerAddress>
<AerStartDate>1996-10-28</AerStartDate>
<AerMonths>110</AerMonths>
<AerOptOut>Y</AerOptOut>
<AerPriorFlag>N</AerPriorFlag>
</AcdElectoral>
- <AcdCreditHistory>
<ChyUsed>Y</ChyUsed>
<ChyType>superuser</ChyType>
I thought I could use :-
$xmlresults = $req->getResponseBody();
$CallResponse = $xmlresults->CallResponse;
$AcdCreditHistory = $CallResponse->AcdCreditHistory;
$ChyType = $AcdCreditHistory->ChyType;
to load the data into a variable ( in this case "superuser" ) and then perform an "if ...Else" on that, but I'm new to PHP and a little lost.
Any ideas ? I'm I looking in the right area ?
Many thanks
No comments posted yet
Your Answer:
Login to answer
117
14
Other forums
Google Map
I have done Google Map Integration for one my project. But for that we need the "latitude and l
Adding delete feature to my forum
Hello I am currently trying to add a delete feature to my forum. I believe I have everything built r
How many users online in the last 24-hours using time()?
I'm fairly new to PHP. I have a MySQL table called 'users' and a field called 'loggedin' which is in
How do I send data using an html link
Hi
If I have
<a href="main_file.php">
How do I send data t
for loop without same $i digits?
Hi,
Can some guru please advise how can I accomplish this with a simple for loop ?
I
Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now
Calling All PHPFREAKS Blackberry Users
Are you a member of PHPFreaks and have a blackberry? Well RIM just recently released Blackberry Mes
Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app
a multi dimensional array with for each
hi, I have been asked to write an array, I have Zone 2,3,4,5,6,7,8 each zone has 3 sections of weigh
Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)