| 1 |
lars |
1 |
<?PHP
|
|
|
2 |
/**
|
|
|
3 |
* Example that shows how the debugging features can be used.
|
|
|
4 |
*
|
|
|
5 |
* $Id: example_features_Debugging.php,v 1.1 2004/11/30 20:03:48 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 |
// Wire will be stored
|
|
|
22 |
$session->setDebug(Services_Ebay_Session::DEBUG_STORE);
|
|
|
23 |
|
|
|
24 |
echo "GetLogoURL('Small');<br />";
|
|
|
25 |
$logo = $ebay->GetLogoURL('Small');
|
|
|
26 |
echo sprintf('<img src="%s" width="%d" height="%d" title="This has been fetched from eBay" />', $logo['URL'], $logo['Width'], $logo['Height'] );
|
|
|
27 |
echo "<br /><br />";
|
|
|
28 |
echo "getWire()<br />";
|
|
|
29 |
|
|
|
30 |
echo "<pre>";
|
|
|
31 |
echo htmlspecialchars($session->getWire());
|
|
|
32 |
echo "</pre>";
|
|
|
33 |
|
|
|
34 |
// all XML data will be sent to STDOUT
|
|
|
35 |
$session->setDebug(Services_Ebay_Session::DEBUG_PRINT);
|
|
|
36 |
echo "GetLogoURL('Small');<br />";
|
|
|
37 |
$logo = $ebay->GetLogoURL('Small');
|
|
|
38 |
echo sprintf('<img src="%s" width="%d" height="%d" title="This has been fetched from eBay" />', $logo['URL'], $logo['Width'], $logo['Height'] );
|
|
|
39 |
echo "<br /><br />";
|
|
|
40 |
?>
|