WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

Data Update and Retrieval Assistance Using Database

Realmussu

New member

0

0%

Status

Offline

Posts

31

Likes

0

Rep

0

Bits

165

3

Months of Service

0%
Hello, I am writing a data scraping bot to improve myself. On the site I am scraping, there are stock numbers available. What I want to do is as follows: If the product name in the database is the same, do not rewrite it, but update the stock quantity. By setting the time limit to zero, I am connecting to the database. I am using PDO to connect to the MySQL database. I am also including the 'simple_html_dom.php' file to parse HTML. I am extracting data from the following URL: https://www.*sitedi*promosyon.com/promosyonurunleri-ajanda-kapaklari-27.html.

I am iterating through the elements with the id 'isimkat a' and extracting information such as name, code, price, stock, and image. Then, I am updating the database with this extracted information. If the record is successfully added, I am also saving the image to a folder named 'images'.
 

249

6,622

6,642

Top