server-webapi-code-09-getTime.php / php
<?php function calleBay(request, appID, endPoint; endPoint?callname=appID &version=length = strlen(headers = array(); headers[] = "Content-Type: text/xml"; length"; As mentioned earlier several of the request parameters will be passed in the get line, the endpoint for the request is generated, including the name request being made, and some specifics about the application making the request. ch, CURLOPT_URL, ch, CURLOPT_HEADER, false); curl_setopt(headers); curl_setopt(ch, CURLOPT_POSTFIELDS, ch, CURLOPT_RETURNTRANSFER, true); curl_setopt(ch, CURLOPT_SSL_VERIFYPEER, false); ch); curl_close(returnRAW == TRUE) { return xml = simplexml_load_string(newXML = newXML; } } function getSimpleTime() { global devID, cert, call = "GeteBayOfficialTime"; <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <RequesterCredentials soapenv:mustUnderstand="0" xmlns="urn:ebay:apis:eBLBaseComponents"> <eBayAuthToken>token</eBayAuthToken> <ns:Credentials xmlns:ns="urn:ebay:apis:eBLBaseComponents"> <ns:DevId></ns:DevId> <ns:AppId>appID</ns:AppId> <ns:AuthCert></ns:AuthCert> </ns:Credentials> </RequesterCredentials> </soapenv:Header> <soapenv:Body> <GeteBayOfficialTimeRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <ns1:Version xmlns:ns1="urn:ebay:apis:eBLBaseComponents">version</ns1:Version> </GeteBayOfficialTimeRequest> </soapenv:Body> </soapenv:Envelope> XMLBLOCK; call, xml = simplexml_load_string(xml); echo "Time: " .
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.