Jump to content

Convert HTML data to excel / php-mysql


banter

Recommended Posts

Hi, does anyone know how best to convert data from tables in html to be put (eventually) in a database?

I have to rework a website consisting fully of html. It is a holiday house website. So there are about 400 houses, but they are structured pretty neat in html, with logical .html follow-up names.

 

But I don't know where to start to get the data/facilities of those houses into excel or a database, cause I want to redesign the website with a mysql-php database system, because they are getting bigger and everything html is way too much work for them when someone makes a reservation.

Any tips?

I am a beginner at php, allthough I have read the PhP5 book and know how it works.

 

Link to comment
https://forums.phpfreaks.com/topic/157116-convert-html-data-to-excel-php-mysql/
Share on other sites

Take a look at the PHP DOM , and in particular the loadhtmlfile function. You could build an array with files and write a script to extract the contents (Keep the max execution time in mind and don't try to do it all at once, by default that's 30 seconds).

If you plan on using xpath to get to a certain node, firebug has a very nice "copy xpath" functionality which could ease the job.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.