views:

51

answers:

2

Given a product id, associates have to navigate a vendors website, log in, perform a search, in order to get details on a product for a customer.

My employers want a program that can use the product id, and navigate the vendors website, and perform the search and everything to get the information thus saving the associate from having to manually repeat this task every time a customer wants more information about a product.

I know many sites use methods to prevent (CAPTCHA) exactly what I am trying to do. So I do not know if that automatically makes my given project an "evil" one. But I certainly do not have evil intentions, my employers simply want to save associates time on getting information that they are going to get regardless. However, if this is "evil" please explain why, so I can explain to my employers why we should not go down this road. That being said...

How can I make something like this in PHP?

+1  A: 

To start with I'd recommend reading up on cURL and DOM

cURL: http://php.net/curl (for fetching pages, even simulating search form)

DOM: http://www.php.net/manual/en/book.dom.php (to parse the fetched pages)

Andrew67
A: 

It depends on what site you are trying to access. Many sites have an API that can be used to access data. If that's not the case, you may need to write a program that loads the html using a GET request, parses through the response, and retrieves the information you want. Without more details, that's the best answer I can give.

Adam