问题
I have a database and want to link amazon products with their asin.
For example B005UEF678 for iPhone 4S, would be
amazon.com/dp/B005UEF678 in the US,
but amazon.de/dp/B005UEF678 in germany.
Actually I don't know which URL is the right, since the user could be from any country?
How would you solve this problem?
API? Switch Case in Userlanguage?
thank you
byt he way I use PHP.
回答1:
there is a servie for ASIN Short URLs called asin.info. You can easily generate your URLs by Amazonlink or with this syntax:
http://asin.info/a/{asincode}
It will redirect the user to the product for the right country.
Hope this will help you.
回答2:
I use Stephen Morley's IPToAmazon. It is a php script that creates links to international Amazon stores based on IP or other criteria (you can configure it).
来源:https://stackoverflow.com/questions/12159775/create-link-with-amazon-asin-number-to-link-the-right-country-e-g-amazon-com