php - How to get a product price from different sites -
i want product price details different sites in internet. user enter search criteria such 'mobile phone'.when user type on mobile phone site should display links of mobile phone selling sites different price. can in php?
you need use html dom scraper...
look simple dom parser php, need (for each site) -
grab page want scrape:
$html = file_get_dom('http://www.somephonesite.com/iphone5.html');
find element on , save it:
$prices['somephonesite'] = $html->find('span[id=price]')->plaintext;
obviously need define function per site not sites use span or same price
id etc, you'll put sites in database along function name , call on foreach
loop.
Comments
Post a Comment