您好,欢迎光临本网站![请登录][注册会员]  
文件名称: Amazon下载
  所属分类: Web开发
  开发工具:
  文件大小: 4096
  上传时间: 2004-08-03
  下载次数: 69
  提 供 者: ljs2002
 详细说明: Now everybody heard of Amazon.com. What not everybody knows that Amazon released an API to access its huge catalogs. What this basically means is that each developer can access the information from Amazon following some simple protocols and every site owner can enhance his own website with content and features from Amazon. The Amazon API comes as a simple Webservice. Here are the first Web services that they have exposed: - Product Display : The ability to search for and retrieve product information from the Amazon.com catalog. - Shopping Cart : The ability to add Amazon.com products to shopping carts, wish lists, and registries from third party locations. No matter of your intentions, you will first need to register and obtain a valid developer token. You can get your token here at this address: http://www.amazon.com/webservices The current listed implementation of Amazon webservices uses Keyword searches. It has basically the same results as searching the books catalog online. As any developer/webmaster can see in the "Amazon.com Web Services Developers Kit v 1.0" document, a lot of other Amazon features are exposed. This would imply extending the base structure I present here. There are multiple approaches from a developer's point of view. The simplest one deals with SOAP and web services classes already implemented in PHP. You could also extend the PEAR's XMLParser object to parse Amazon results. The reason I did not choose these directions is because they require additional extensions installed with PHP. What I currently use is the XML parsing package that comes embedded in PHP, so it is slightly more general. What basically happens in this implementation is that the search word entered by the used is embedded into a XML url that is then retrieved from Amazon.com. Then PHP builds a nice display for the information received. I should let the code talk for itself. Here is the main controller, with a small search form for Amazon: http://www.php9.com/php/source/amazon.phps As you see, the actual code is very small. Then here is the class used in the controller to parse the XML returned by Amazon. http://www.php9.com/php/source/amazon_class.phps Then the configuration file. I need to remember you that you need to change the DEVELOPER_TOKEN constant with the one you will obtain from Amazon. The current license key belongs to me. http://www.php9.com/php/source/amazon_config.phps And here is the layout template used to build the output from the XML document retrieved from Amazon. It is parsed every time a book record is retrieved, so the output rendering is the fastest possible. http://www.php9.com/php/source/amazon_layout.phps Here you have the full package zipped. http://www.php9.com/php/source/amazon.zip And of course a demo: http://www.php9.com/amazon.php Feel free to use it and improve. I am open to suggestions ...展开收缩
 近期下载过的用户:
 相关搜索: Amazon API CLASS类库
 输入关键字,在本站1000多万海量源码库中尽情搜索:  
文件列表(查看文件列表判断是否您需要的文件):
	

相关说明

  • 本站是交换下载平台,提供一个交流的渠道,下载的内容请自行研究使用。
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 本站提供下载的内容为网上收集或会员上传提供,若无意中侵犯了您的版权,请与我们联系.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.