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
Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t
Automatically Detect Phone Model for WAP Jar Deployment
Making a wap site is fairly simple, but I'd like to know if there's a way to make it so that the wap
Email Script does not reach destination
Hey Guys look at this code snippet :
Code:
//read a line from the file
$myFile = "
Displaying Column Names
I have a question regarding the ability to show the column names from my table/query.
What I'm lo
shift numbers with paging
Hi
How would i be able to display 10 numbers 1 2 3 4 5 6 7 8 9 10
and when I click next
Google voice
I currently have a form in html, but I want it in php so the information is not in the source code.<
What's best way to get a user's Word doc converted to simple html and images?
Hi all,
I was just wondering if anybody has any experience of this.
Basically, I'm buildin
Upload file and add HTML
Hey everyone,
I have a client has meeting agendas and minutes that should be posted online. I
DELETE rows based on content
I have a link in my rows
$bit="http://bit.ly/abcd";
$query = mysql_query("D
php problem?
I don't think I'm stupid, but maybe I am.
I am working on a sit for a friend I am try to put