Forum Moderators: coopster

Message Too Old, No Replies

PHP client connecting to a Travel database

How to use PHP to send and receive XML to/from GTA

         

Alina

12:41 pm on Apr 8, 2004 (gmt 0)

10+ Year Member



Hello

I am trying to create a client hotel booking interface to Gullivers Travel Associates. In order to connect to them i will be using XML and PHP and will be using HTML to display information received from them. Their specification states the following:

"Simplified Client interface. The API will use standard HTTPS protocols replacing previous GTA offerings based on MQ Series - all that will be needed is an HTTPS POST request. This will give the following advantages: -
·Industry standard protocols
·No additional components required (e.g. MQ Series)
·Security established through use of SSL
·"Push" technology provided by a more efficient mechanism for receiving asynchronous responses."

As I am new to XML but know PHP fairly (not very) well ... I have got a couple of questions regarding the above statement.

1. Can i use PHP fsockopen to connect to their server?
2. If so, would the port number for fsockopen be 80? or is this different for HTTPS?
3. What is this "push" technology that they are referring to? Do i need to implement constant querying of the GTA server to receive their booking status? Below is one of their replies to me - regarding bookings:

"You will not need the synchronous mode and we will not make it available for bookings. If you send us an asynchronous request we will return a token immediately. You can write your program in a way that you then immediately return this token to us asking for an update of the booking status. If you work in this way then it will only take a couple of seconds to retrieve the token and receive the latest status of the booking. You most likely will find it even more convenient to use a push mechanism. That way you would receive a message from us as soon as the booking changes status. Please note, that even if we would change our software and you could get a "Synchronous" response for booking messages from us this would not give you any advantage. You still would first receive a pending status message from us as all bookings go into this status very briefly before moving into a confirmed status, even if we have allotment available. Then you would have to send another new request, to check if the booking has been confirmed."

GTA have detailed XML - but no example client code ... so please forgive my ignorance in perhaps asking obvious questions on this forum. Any advice/clarification would be much appreciated.

Alina

RonPK

2:39 pm on Apr 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just some thoughts:
1. at [pear.php.net...] you may find some useful libraries for handling xml
2. the default port for https is 443