I am trying to get some pricing information from a website. The website will prompt a window to select country. After selecting a country, the website will set a cookie and will show the data according to that country.
I used file_get_html
to parse data from the website. The problem is, It showing default price. So, My question is, Is it possible to set cookie as per we want using the file_get_html
or any other way to do it.
The code I am using to parse data from the website are the following.
include_once 'simple_html_dom.php';
$content = "http://www.luluwebstore.com/products/lulu-household-pets-pet-food/purina/purina-dog-chow-little-bites-dry-food-181-kg/pid-8263178.aspx";
$html = file_get_html($content);
echo $price = $html->find('div[class=price_stockdiv_l3]',0);
The result of the above code is:
OUR PRICE : AED 10.00 MRP : AED 11.00 9%off
By default, the website will fetch AED pricing, but, I want the result in QAR pricing. If we are browsing the website first time it will promot a window to select country.
The site following a cookie like the below to save the country.