页面中的一个文本框。用户将从www.example.com粘贴一个产品URL,然后单击文本框旁边的按钮。然后需要接收产品的重量和尺寸,以便稍后使用。按下按钮将调用jquery ajax调用。Amazon.com and then click a button beside the text box. Then weight and dimension of the product needs to be received so that these can be utilized later. pressing the button will invoke a jquery ajax call.
从亚马逊的产品广告记录来看,ASIN似乎是获得产品细节的第一步,但是我如何从产品URL中获得ASIN呢?
示例产品URL为:here.
我使用的是php
1条答案
按热度按时间5m1hhzi41#
在ruby on rails中,我使用了下面的方法,到目前为止效果很好。
这应该是非常相似的PHP。对不起,我不是Maven与PHP正则表达式语法。但祝你好运!这是基于ASIN总是10字符长,并开始与大写字母,组成与字母和数字只。