search script which find web page in website stored in database

笑着哭i 提交于 2019-12-14 04:07:33

问题


I am no expert, but I'm trying to write a universal script for searching on some website which is stored in a database, for example in the database is stored "ebay.com" and "amazon.com".

When I type in on my webpage into a text box any keyword (for example "iphone"), the stript will find:

On ebay:

http://www.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313.TR9.TRC1.A0.Xiphone&_nkw=iphone&_sacat=0&_from=R40

On Amazon:

http://www.amazon.com/s/ref=nb_sb_noss_2/190-1864389-3911824?url=search-alias%3Daps&field-keywords=iphone

After getting this result I would like to store it in an array.

And i need that this script will work for every e-shops


回答1:


You can use Ebay and Amazon APIs. If you check the documentation you will see that some search functions are available there.

Ebay's finding tutorial with PHP and Javascript examples:

http://developer.ebay.com/Devzone/finding/HowTo/index.html

And Amazon's API reference

http://docs.aws.amazon.com/AWSECommerceService/latest/DG/CHAP_ApiReference.html


来源:https://stackoverflow.com/questions/19089932/search-script-which-find-web-page-in-website-stored-in-database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!