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
LSB (PHP 5.3) problem with static value!
hello,
i'm having a problem. static::$text variable gets lost at some point. can someone plea
php/mysql problem
Hey all,
Problem: im trying to setup a shop where people can use a drop-down list to select t
Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br
elseif help!
OK so I'm new to the site, as well as PHP altogether (Trying my hand at managing an online RPG) and
php forms and database navigatio
Hello,
I'm new to php and i'd like to post the following.
I have written code to get records f
Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"
help with php
It's not displaying or pulling anything out of the database.
Code: <html><
ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c
HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to
RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mai