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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.