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
"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP th
records between 2 dates
Hello all,
I have a date tracked table which contains effective_start_date and effective
phph within href not showing php if change ? to &
Code: [Select]<a href="<?php echo $puser; ?>?m=<?php=(($m-1)&l
PHP MySQL and DATE
Hi everyone
I have a databse and in one of the columns I have date values such as 2009-March-
Time script, set to my time zone?
I am using this line to get the date and time
Code: $time = date(F." ".d.", &q
php include email form with attachment
I have had no luck with finding a email form all over the Internet for various reasons. Some insecur
Date/Time and Checkbox
Hi Everyone,
I am trying to figure out how to insert the current date and tim
subtract 1 from value entered in text field
Hi
How do I subtract 1 from the vaue entered into a text field?
Thanks
include function being weird?
I have a very simple system to grab an IP outputted by a PHP file.. (for a project I have) but it ou
switch form actions? not working
i want on submit to go to different pages according to the CatID
Code: <?php $CatID=$_