with Lorelle and Brent VanFossen

Hunting for HTML to Database Conversion Software

I’ve spent hours hunting all over the net for software that will convert my HMTL pages to something that will fit in a database. The reason? I want to convert my web site to PHP and mySQL and that requires taking my current pages and converting them to a form that can be read by a database such as Excel, Access, or mySQL. With more than 500 pages on our web site, stripping the codes and putting in tabs, commas or recognizable code for databases to understand for import is an incredibly time consuming effort doing it one page at a time. Ugh.

The first few hours were spent trying to find the terminology for the process of converting, importing, changing, migrating, or just fixing HMTL to make it recognizable by a database program. I tried “convert HMTL to php” and “convert HTML to mysql” with little success. I dug through hundreds of pages that gave me more than I wanted to know about how to generate HTML pages with PHP and mySQL but nothing on getting the HTML into mySQL.

Finally I stumbled upon the phrase “convert HTML to database”. That brought me more possibilities, but unfortunately, as with a lot of the Internet, the suggestions were more appropriate for those using Windows 3.11 or Windows 95 than newer software and the links were dead.

I did stumble upon one site that specializes in file conversion software called Intelligent Converters but they only can help turn database information into something else like pdf, html, and other database program information.

I found an amazing site called GetaFreelancer.com. I stumbled on it because a company was looking for someone to convert a web site’s 200 pages to a database setup. They had dozens of people and companies willing to bid on the job. The account was closed so I assume they hired someone, but this is really worth a further look at…later, when I have time.

Continuing to plug away at this – more determined to spend time hunting for a quick solution than actually spending hours on end copying and pasting from more than 500 web pages – I finally found some possibilities. I will give them a try over the next few days and report back.

FileChicken.com , a funny name but interesting site. It listed a bunch of HTML conversion programs available for downloading including programs for converting HTML to and from other things. But as soon as I found that page, the rest of the site started not functioning. PHP errors everywhere. Luckily I was able to get to the home page of one of the software developers and download a program from there.

Here are some others:

According to several sites, “converting your current html to php is easier done than said”. They recommend several things.

Slip PHP in Where Needed
Change your page name extensions to php (and where is a batch program that will do that, huh?) and then slap in php code around your current html code and you have php. I assume you will then add php content and database information as your site grows, or you slowly change things over. This idea is a nice one but doesn’t answer my specific needs. It is more of a “get by” process.
Change Your .htacess File to Recognize HTML as PHP
Once you start changing your file extensions, broken and dead link hell appears. Links from inside and outside your web site become lost and broken, crippling your site. Yet, it seems that PHP can recognized HTML files if it is told to do so. SpiderPro offered a step-by-step process to explain how to change your .htaccess file to recognize all HTML extensions as PHP, as do Webmasterworld Forum discussion on PHP Server Side Scripting, Virtualvenus WIKI information on converting to PHP, and an article about understanding Apache Servers and Redirects , explanations for Apache on addtype.
Basically, it means adding the following two lines to your .htaccess file:

AddType application/x-httpd-php .php .php3 .phtml .html
AddHandler x-httpd-php .html

Do this at your own risk. Server must be Apache and handle mod-rewrites.

So I’ll keep working on all of this and let you know if I survive the transformation from HTML to PHP.
Mobile, Alabama

3 Comments

  • Posted December 6, 2005 at 3:30 | Permalink

    Hi…can u help me on the search engine? I’m having problem in inserting a text file (converted from htm) into a table (which consists of 6 field) in MS Access. Thank You.

  • Posted December 6, 2005 at 8:35 | Permalink

    This article is about putting text in a MySQL database not MS Access. You will have to seek information on Access from those who are familiar with it, like Microsoft or one of the many helpful sites dedicated to Microsoft Access, or the newsgroups or chats with knowledgeable people who deal with Access.

    Good luck.

  • Posted December 21, 2005 at 8:41 | Permalink

    Hi there. I have the same issue as you and I have found a utility called Pars-O-Matic which is available for download from http://members.aol.com/getmydata/pc-index.html

    Once you can get the data into a structured format such as CSV or Excel you can then import it into MySQL and then create the table links.

    Hope this helps.

    Paul

Post a Comment

Your email is kept private. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.