Well, the concept is fairly simple, but there isn't one fix-all solution - You have to write a routine to parse the HTML from the website in question.
A basic example though would go something like this -
Step 1) Fetch the HTML from the site in question.
I usually use the file command to do it, and use implode to turn it back into a string from an array:
Code:
$Source = implode( '', file( "http://www.google.com" ) );
You could technically use fopen too, but theres more lines to handle that.
Step 2) Parse the Source.
This is the tricky part. I can't even begin to describe how to go about doing it, because the websites are so different.
Step 3) Store the Data.
Now you just have to actually STORE the data. You'll want a simple insert SQL statement inorder to update the Database, something like this:
Code:
INSERT INTO MyTable( 'Field1Name', 'Field2Name', 'Field3Name' ) VALUES ( 'DataValue1', 'DataValue2', 'DataValue3' )
That should give you a fairly basic idea of how it would work. I can help you more with the parsing part if you could post the link your parsing and describe what parts of it you need.