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 the URL of the eBay logo
4
 * in three sizes.
5
 *
6
 * This call returns an array with the URL, width and height
7
 *
8
 * $Id: example_GetLogoUrl.php,v 1.1 2004/10/28 17:14:53 schst Exp $
9
 *
10
 * @package     Services_Ebay
11
 * @subpackage  Examples
12
 * @author      Stephan Schmidt
13
 */
14
error_reporting(E_ALL);
15
require_once '../Ebay.php';
16
require_once 'config.php';
17
 
18
$session = Services_Ebay::getSession($devId, $appId, $certId);
19
 
20
$session->setToken($token);
21
 
22
$ebay = new Services_Ebay($session);
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
 
29
echo "GetLogoURL('Medium');<br />";
30
$logo = $ebay->GetLogoURL('Medium');
31
echo sprintf('<img src="%s" width="%d" height="%d" title="This has been fetched from eBay" />', $logo['URL'], $logo['Width'], $logo['Height'] );
32
echo "<br /><br />";
33
 
34
echo "GetLogoURL('Large');<br />";
35
$logo = $ebay->GetLogoURL('Large');
36
echo sprintf('<img src="%s" width="%d" height="%d" title="This has been fetched from eBay" />', $logo['URL'], $logo['Width'], $logo['Height'] );
37
echo "<br /><br />";
38
 
39
echo "GetLogoURL();<br />";
40
$logo = $ebay->GetLogoURL();
41
echo sprintf('<img src="%s" width="%d" height="%d" title="This has been fetched from eBay" />', $logo['URL'], $logo['Width'], $logo['Height'] );
42
echo "<br /><br />";
43
 
44
echo "GetLogoURL(array('Size' => 'Small'));<br />";
45
$logo = $ebay->GetLogoURL(array('Size' => 'Small'));
46
echo sprintf('<img src="%s" width="%d" height="%d" title="This has been fetched from eBay" />', $logo['URL'], $logo['Width'], $logo['Height'] );
47
echo "<br /><br />";
48
?>