Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?PHP
2
/**
3
 * example that fetches an item
4
 *
5
 * $Id: example_GetItem.php,v 1.2 2004/11/07 12:14:38 schst Exp $
6
 *
7
 * @package     Services_Ebay
8
 * @subpackage  Examples
9
 * @author      Stephan Schmidt
10
 */
11
error_reporting(E_ALL);
12
require_once '../Ebay.php';
13
require_once 'config.php';
14
 
15
$session = Services_Ebay::getSession($devId, $appId, $certId);
16
 
17
$session->setToken($token);
18
 
19
$ebay = new Services_Ebay($session);
20
 
21
$item = $ebay->GetItem(4501333179);
22
 
23
echo 'User-Id of the seller: '.$item->Seller->UserId.'<br />';
24
 
25
echo '<pre>';
26
print_r($item->toArray());
27
echo '</pre>';
28
 
29
/**
30
 * to get the item description,
31
 * you must use Detail Level 2
32
 */
33
$item = $ebay->GetItem(4501333179, 2);
34
 
35
echo 'Get description of the item:<br />';
36
echo $item->Description;
37
 
38
echo 'You may also access properties using the array syntax:<br />';
39
echo $item['Description'];
40
?>