Display Items from 14 Different Countries

In example 4, we learned how to display auction items that only have photos. In this example, we'll learn how to set phpBay to search Ebay sites from other countries. phpBay Pro API supports results from 14 different countries. These include:

  • United States - siteId=0&language=en-US
  • Australia - siteId=15&language=en-AU
  • Austria - siteId=16&language=de-AT
  • Belgium - siteId=123&language=nl-BE
  • Canada - siteId=2&language=en-CA
  • France - siteId=71&language=fr-FR
  • Germany - siteId=77&language=de-DE
  • India - siteId=203&language=en-IN
  • Ireland - siteId=205 (no language here??)
  • Italy - siteId=101&language=it-IT
  • Netherlands - siteId=146&language=nl-NL
  • Spain - siteId=186&language=es-ES
  • Switzerland - siteId=193&language=de-CH
  • United Kingdom - siteId=3&language=en-GB

Why is this important? Many developers like yourself live in countries around the world. This allows for a web site developer in Italy whose site is about Italy to list auction items from Italy. Offering your site visitors the opportunity to bid on items in their home country is good common sense.

Notice in the list above, after each country, there is a siteID= value and a language= value. These are the values we need to set in the phpBay code in order to display products from the given country.

To start off, let's set siteID=71 and language=fr-FR
Then let's set the keyword to: mp3 player
and return 15 results

In the source of this file, where your phpBay code is, this would look like:

$ebay->eb_siteId = "71";
$ebay->eb_language = "fr-FR";

It's that simple! Just change these values to correspond with the values above for any of the countries listed, and not only are you listing items from that country, but the item text is in the language and that currency.

Keep in mind, that many countries do not have as many results for common items that may be available in the USA. That aside, it's a great way to offer local items to your visitors based upon the country your site is in.

View the source code of this file to see the php code used. Click here to view the next example.

The Result

batterie-pour-archos-player-gmini-120-mp3-***1500mah*** Batterie Pour Archos Player Gmini 120 MP3 ***1500mAh***
14,40 EUR
Auction Ends: Fin: samedi févr.-04-2012 7:45:14 CET
Acheter | Ajouter à vos Affaires à suivre
batterie-samsung-yh-920-yh-925-mp3-player-ppsb0502-uk Batterie Samsung YH-920,YH-925 MP3 Player,PPSB0502,UK
13,58 EUR
Auction Ends: Fin: samedi févr.-04-2012 10:42:39 CET
Acheter | Ajouter à vos Affaires à suivre
batterie-sony-hdps-m1-m1-mp3-player-hdd-photo-stor-uk Batterie Sony HDPS-M1,M1 Mp3 Player,HDD Photo Stor,UK
13,58 EUR
Auction Ends: Fin: samedi févr.-04-2012 10:42:43 CET
Acheter | Ajouter à vos Affaires à suivre
batterie-pour-archos-player-gmini-120-mp3-pmparg120-uk Batterie Pour Archos Player Gmini 120 MP3 PMPARG120,UK
13,58 EUR
Auction Ends: Fin: samedi févr.-04-2012 12:29:20 CET
Acheter | Ajouter à vos Affaires à suivre
mpman-mp3-mp4-player-jpeg-fm-radio-apn-micro-sd-cart-slot MPMAN - MP3 - MP4 PLAYER- JPEG - FM RADIO - APN - MICRO SD CART SLOT
34,00 EUR (0 Enchère)
Auction Ends: Fin: samedi févr.-04-2012 12:43:51 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
batterie-pour-gateway-dmp-x20-mp3-player-dmp-x20-new-uk Batterie Pour Gateway DMP-X20 MP3 player,DMP-X20,NEW,UK
14,62 EUR
Auction Ends: Fin: samedi févr.-04-2012 12:48:58 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
batterie-pour-rollei-es1020g-mp3-player-2900mah-new-uk Batterie Pour Rollei ES1020G MP3 Player,2900mAh,NEW,UK
14,62 EUR
Auction Ends: Fin: samedi févr.-04-2012 13:45:03 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
batterie-pour-sonstige-x-drive-mp3-player-gs-533048-uk Batterie Pour Sonstige X Drive MP3 player,GS 533048,UK
13,58 EUR
Auction Ends: Fin: samedi févr.-04-2012 14:09:10 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
batterie-samsung-napster-mp3-player-yp106g-pmpsgy91-uk Batterie Samsung Napster MP3 player,YP106G,PMPSGY91,UK
14,62 EUR
Auction Ends: Fin: samedi févr.-04-2012 14:37:54 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
4gb-4go-1-8-inch-tft-mp4-mp3-lecteur-media-player 4Gb 4Go 1.8 inch TFT MP4 MP3 Lecteur Media Player
24,90 EUR
Auction Ends: Fin: samedi févr.-04-2012 14:41:04 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
batterie-externe-pour-apple-ipod-mp3-player-1000mah Batterie Externe pour APPLE iPod MP3 Player 1000mAh
22,51 EUR
Auction Ends: Fin: samedi févr.-04-2012 15:36:15 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
~car-mp3-player-fm-transmisor-remoto-usb-sd-mmc-ranura ~Car MP3 player FM Transmisor Remoto USB/SD/MMC Ranura
2,69 EUR (0 Enchère)
Auction Ends: Fin: samedi févr.-04-2012 17:58:31 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
bench-baladeur-cd-mp3-lecteur-player-neuf-aiwa-sony-philips-jvc-panasonic BENCH BALADEUR CD MP3 LECTEUR PLAYER NEUF (aiwa sony philips jvc panasonic)
10,50 EUR (7 Enchères)
Auction Ends: Fin: samedi févr.-04-2012 18:21:31 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
built-in-4go-4gb-7-0-7-hd-gps-*-128mo-ddr2-ram-*mp3+video-player*fmt*09-10-map Built-in 4Go 4GB 7.0" 7" HD GPS * 128Mo DDR2 RAM *MP3+Video Player*FMT*09/10 Map
46,99 EUR (0 Enchère)
Auction Ends: Fin: samedi févr.-04-2012 18:36:02 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre
mp4-mp3-media-player-couleur-16go-+-charge-usb-compatible-nano-colorie-au-choix MP4 MP3 Media Player couleur 16GO + charge usb compatible nano colorie au choix
35,00 EUR
Auction Ends: Fin: samedi févr.-04-2012 18:38:04 CET
Enchérir | Acheter | Ajouter à vos Affaires à suivre