PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Redirect browser dependant on XML streem variable.

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTTP
View previous topic :: View next topic  
Author Message
Smoothas



Joined: 15 Oct 2009
Posts: 5
Location: Newbury

PostPosted: Mon Oct 26, 2009 5:59 pm    Post subject: Redirect browser dependant on XML streem variable. Reply with quote

Hello,

I've managed to get php/PEAR to stream XML data to an external source and display the XML response back.

What I need to do now is intrograte this response ( perferably on the Fly ) and redirect the browser to a perdefined page dependant on a veriables results.

ie: Data Stream coming in ( Snipped )

<?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="external website url">
- <CallResponse>
....SNIPPPED RESPONSE ......
<WARNING>N</WARNING>
<AcdWarnAddressNonStd>N</AcdWarnAddressNonStd>
</CallResponse>
</PerformMLCheckResponse>
</soap:Body>
</soap:Envelope>

I was trying to do it using :-

$xmlResponse = simplexml_load_string($req->getResponseBody());
echo $xmlResponse ->PerformMLCheckResponse ->CallResponse ->WARNING;

to try and , atleast, display the varibles content, but no luck.

Can anyone help me in diverting the brwoser pages to a defined address depending the the Variables value ( ie N to www.website.co.uk/fail.html. Y to www.website.co.uk/ok.html).
Back to top
View user's profile Send private message
Smoothas



Joined: 15 Oct 2009
Posts: 5
Location: Newbury

PostPosted: Thu Oct 29, 2009 10:31 am    Post subject: Reply with quote

http://www.tek-tips.com/viewthread.cfm?qid=1576102&page=1
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTTP All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement