question

shopingbase avatar image
0 Likes"
shopingbase asked

GetStore doesnt return xml

I tried so many things.. nothing works.. The api just doesnt return any xml.. not even failure xml. When I try changing url to any other api link.. it does give me some sort of error.. like failure.. but https://api.ebay.com/ws/api.dll ..nothing. I use this code: $username= urlencode($_GET["username"]); $endpoint = ' https://api.ebay.com/ws/api.dll'; // create the xml request that will be POSTed $xml = ' '; $xml .= ' '; $xml .= ' '; $xml .= ' Mytoken '; $xml .= ' '; $xml .= ' '. $username .' '; $xml .=' 1 '; $xml .= ' '; $headers = array( 'X-EBAY-API-COMPATIBILITY-LEVEL:933', 'X-EBAY-API-DEV-NAME:--', 'X-EBAY-API-APP-NAME:--', 'X-EBAY-API-CERT-NAME:--', 'X-EBAY-API-SITEID:0', 'X-EBAY-API-CALL-NAME:GetStore' ); $session = curl_init($endpoint); // create a curl session curl_setopt($session, CURLOPT_POST, true); // POST request type curl_setopt($session, CURLOPT_POSTFIELDS, $xml); // set the body of the POST curl_setopt($session, CURLOPT_RETURNTRANSFER, true); // return values as a string - not to std out curl_setopt($session, CURLOPT_HTTPHEADER, $headers); //set headers using the above array of headers $responseXML = curl_exec($session); // send the request curl_close($session); // $json = json_encode(simplexml_load_string($responseXML),true); // $obj = json_decode($json,true); echo $responseXML;
apigetstore
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.