Witam,

Mam problem z wyciągnięciem z eBay za pomocą SOAP konkretnych danych np. tytułu, opisu itd.

Poniższy kod zwraca wszystki dane.

  1. <pre>
  2. <?
  3. $devId = 'Klucz1';
  4. $appId = 'Klucz2';
  5. $certId = 'Klucz3';
  6.  
  7. $token = "TOKEN";
  8.  
  9. $wsdl_url = 'http://developer.ebay.com/webservices/latest/eBaySvc.wsdl';
  10.  
  11. $client = new SOAPClient($wsdl_url, array(
  12. 'trace' => 1
  13. , 'exceptions'=> 1
  14. , 'encoding'=>'UTF-8'
  15. , 'location' =>
  16. 'https://api.ebay.com/wsapi?callname=GetItem&siteid=0&appi
  17. d='.urlencode($appId).'&version=417&Routing=New'
  18. ));
  19.  
  20. $Auth = new ArrayObject(array(
  21. 'eBayAuthToken' => new SoapVar($token, XSD_STRING, NULL, NULL, NULL,
  22. 'urn:ebay:apis:eBLBaseComponents'),
  23. 'Credentials' => new SoapVar(
  24.  new ArrayObject(
  25.  'AppId' => $appId,
  26.  'DevID' => $devId,
  27.  'AuthCert' => $certId
  28. )
  29.  )
  30. , SOAP_ENC_OBJECT
  31. , null
  32. , null
  33. , null
  34. , 'urn:ebay:apis:eBLBaseComponents'
  35. ),
  36. ));
  37.  
  38. // formatting header
  39. $header_body = new SoapVar($Auth, SOAP_ENC_OBJECT);
  40.  
  41. $header = array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents',
  42. 'RequesterCredentials', $header_body));
  43.  
  44. $params = array('Version' => 417,
  45. 'DetailLevel' => 'ReturnAll',
  46. 'ItemID'=>'180022136730');
  47.  
  48. $user = $client->__soapCall('GetItem', array($params), NULL, $header);
  49.  
  50. print_r($user);
  51. ?>



Takie dane zwraca poniższy kod:

  1. <?php
  2. stdClass Object
  3. (
  4. [Timestamp] => 2006-09-03T17:36:06.539Z
  5. [Ack] => Success
  6. [Version] => 475
  7. [Build] => e475_core_Bundled_3434599_R1
  8. [Item] => stdClass Object
  9. (
  10. [AutoPay] => 
  11. [BuyerProtection] => ItemIneligible
  12. [BuyItNowPrice] => stdClass Object
  13. (
  14. [_] => 25
  15. [currencyID] => PLN
  16. )
  17.  
  18. [Country] => PL
  19. [CrossPromotion] => stdClass Object
  20. (
  21. [ItemID] => 180022136730
  22. [PrimaryScheme] => CategoryProximity
  23. [PromotionMethod] => UpSell
  24. [SellerID] => hawk15091946
  25. [ShippingDiscount] => 
  26. [SellerKey] => 0
  27. [PromotedItem] => Array
  28. (
  29. [0] => stdClass Object
  30. (
  31. [ItemID] => 180015023651
  32. [PictureURL] => <a href="http://thumbs.ebaystatic.com/pict/180015023651.jpg" target="_blank">http://thumbs.ebaystatic.com/pict/180015023651.jpg</a>
  33. [Position] => 1
  34. [PromotionPrice] => stdClass Object
  35. (
  36. [_] => 35
  37. [currencyID] => PLN
  38. )
  39.  
  40. [PromotionPriceType] => BuyItNowPrice
  41. [SelectionType] => Automatic
  42. [Title] => WAGON TYPU AMERYKAŃSKIEGO MEHANO GREAT NORTHERN
  43. [ListingType] => StoresFixedPrice
  44. )
  45.  
  46. [1] => stdClass Object
  47. (
  48. [ItemID] => 180024747909
  49. [PictureURL] => <a href="http://thumbs.ebaystatic.com/pict/180024747909.jpg" target="_blank">http://thumbs.ebaystatic.com/pict/180024747909.jpg</a>
  50. [Position] => 2
  51. [PromotionPrice] => stdClass Object
  52. (
  53. [_] => 6.5
  54. [currencyID] => PLN
  55. )
  56.  
  57. [PromotionPriceType] => BuyItNowPrice
  58. [SelectionType] => Automatic
  59. [Title] => BALSA KWADRAT 10 X 10 X 980
  60. [ListingType] => FixedPriceItem
  61. )
  62.  
  63. [2] => stdClass Object
  64. (
  65. [ItemID] => 180024747189
  66. [PictureURL] => <a href="http://thumbs.ebaystatic.com/pict/180024747189.jpg" target="_blank">http://thumbs.ebaystatic.com/pict/180024747189.jpg</a>
  67. [Position] => 3
  68. [PromotionPrice] => stdClass Object
  69. (
  70. [_] => 18.5
  71. [currencyID] => PLN
  72. )
  73.  
  74. [PromotionPriceType] => BuyItNowPrice
  75. [SelectionType] => Automatic
  76. [Title] => PASKI DO SZLIFOWENIA EXCEL NR55683 grift 400
  77. [ListingType] => FixedPriceItem
  78. )
  79.  
  80. [3] => stdClass Object
  81. (
  82. [ItemID] => 180024747972
  83. [PictureURL] => <a href="http://thumbs.ebaystatic.com/pict/180024747972.jpg" target="_blank">http://thumbs.ebaystatic.com/pict/180024747972.jpg</a>
  84. [Position] => 4
  85. [PromotionPrice] => stdClass Object
  86. (
  87. [_] => 4.5
  88. [currencyID] => PLN
  89. )
  90.  
  91. [PromotionPriceType] => BuyItNowPrice
  92. [SelectionType] => Automatic
  93. [Title] => PRĘT MODELARSKI z drzewa sosnowego o Ĺ&#8250;rednicy 9,8 mm 
  94. [ListingType] => FixedPriceItem
  95. )
  96.  
  97. )
  98.  
  99. )
  100.  
  101. [Currency] => PLN
  102. [Description] => Zamek ROTENFELS 1/120 JEST TO MODEL KARTONOWY W SKALI TT 1/120 ZAMKU NIEMIECKIEGO WYDANY PRZEZ FIRME SCHREIBER-BOGEN MODELLBAU.SWIETNY NA MAKIETE KOLEJOWA. 
  103. Aleksander OLBRACHT, 27-200 Starachowice, ul. GĂłrna 11a/24, Polska. Konto w m Banku Nr:87 1140 2004 0000 3802 3182 1518 lub Bank Polska Kasa Opieki S.A. II o / Starachowice, 27-200 Starachowice, ul. Lipowa 29,nr.konta: 32 1240 1398 1111 0010 0701 3101 lub konto INTELIGO 50 1020 5558 1111 1538 0590 0055 Bank Zachodni WBK S.90 1090 2040 0000 0001 0478 5784&#8218;aĹ›ciciel konta: Aleksander Olbracht  ProszÄ™ w tytule przelewu podać nr . wygranego przedmiotu i nr .aukcji lub nazwÄ™ przedmiotu. O kosztach przesyĹ‚ki proszÄ™ siÄ™ poinformować u sprzedawcy. Sklep modelarski"ALEKSO"27-200 Starachowice ul .GĂłrna 11A/24. Telefon kontaktowy: (041) 274 2923 (w godz.: do 9:30 do 23:00). Tel . kom. 0~609331599,GG-8878041 Skype : aleksanderolbracht.
  104. e-mail:aleksander.olbracht@wp.pl POZDRAWIAM.
  105. =============================================================================Aleksander OLBRACHT, 27-200 Starachowice, ul. GĂłrna 11A/24, Polen. Bankkontonummer:87 1140 2004 0000 3802 3182 1518 bei m Bank ( Polen ) Kontobesitzer: Aleksander Olbracht) oder bei Bank Polska Kasa Opieki S.A. II o/Starachowice,27-200 Starachowice, ul. Lipowa 29,Bankkontonummer:PL 32 1240 1398 1111 0010 0701 3101 PKOPPLPW lub konto INTELIGO 50 1020 5558 1111 1538 0590 0055 Bank Zachodni WBK S.A 90 1090 2040 0000 0001 0478 5784 Kontobesitzer: Aleksander Olbracht. Bitte geben Sie auf dem Ăśberweisungsformular die Nummer des gewahlten Produktes und die Auktionnummer an. Betreffend Versandkosten wenden Sie sich, bitte, an den Verkäufer. MODELGESCHAEFT"ALEKSO" Kontakttelefon: 48 41 274 2923 Tel . kom. 0~609331599,GG-8878041 Skype : aleksanderolbracht.
  106. e-mail:aleksander.olbracht@wp.pl Beste GrĂĽsse.
  107. [GiftIcon] => 0
  108. [HitCounter] => NoHitCounter
  109. [ItemID] => 180022136730
  110. [ListingDetails] => stdClass Object
  111. (
  112. [Adult] => 
  113. [BindingAuction] => 
  114. [CheckoutEnabled] => 1
  115. [ConvertedBuyItNowPrice] => stdClass Object
  116. (
  117. [_] => 8.1
  118. [currencyID] => USD
  119. )
  120.  
  121. [ConvertedStartPrice] => stdClass Object
  122. (
  123. [_] => 6.48
  124. [currencyID] => USD
  125. )
  126.  
  127. [HasReservePrice] => 
  128. [StartTime] => 2006-08-25T19:18:20.000Z
  129. [EndTime] => 2006-09-04T19:18:20.000Z
  130. [ViewItemURL] => <a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=180022136730&category=2595" target="_blank">http://cgi.ebay.com/ws/eBayISAPI.dll?ViewI...p;category=2595</a>
  131. [HasUnansweredQuestions] => 
  132. [HasPublicMessages] => 
  133. [ExpressListing] => 
  134. )
  135.  
  136. [Quantity] => 1
  137.  
  138. )
  139.  
  140. )
  141. ?>