Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Post variables to script, receive XML stream

Status
Not open for further replies.

moleproductions

Programmer
Oct 23, 2003
43
0
0
GB
I have a situation in PHP where I need to post certain variables (username and password) to an authorisation script on a 3rd party server. On receipt of those two variables the script authenticates the data and sends an XML stream back which looks like:

Code:
- <xml xmlns:s="xxx" xmlns:dt="xxx" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
- <s:Schema id="RowsetSchema">

... etc ...

  <z:row accessname="Joe Bloggs" /> 
  </rs:data>
  </xml>

Does anyone know how in PHP to send the two variables to the 3rd party script, how to read the XML stream back, and how to determine what the "accessname" is set to?

Something like (but in PHP):
Code:
 <XML stream>=post('fldUsername=$username,fldPassword=$password','[URL unfurl="true"]http://www.domain.com/authenticate.asp');[/URL]
 $login_name=<XML stream>[accessname];

Any help, gratefully received!
Thanks.
 
there is an FAQ posted by sleipnir214 in the FAQ section of this site which gives advice on posting data via php.
 
Thanks for poiting that out - I hadn't realised that was the same thing.

Do you know how to read the XML stream that come back?
 
i'd imagine it will just come back in the string. parse for the <?xml start point i guess.

sleipnir214's the chap on this tho: his FAQ and all.
 
actually ... i don't know whether sleipnir214 is a guy or a gal. hope no offence caused by the reference to chap if i got it wrong.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top