Skip to main content
Participating Frequently
December 14, 2010
Question

Importing a dataset on a external webpage into mySQL

  • December 14, 2010
  • 1 reply
  • 419 views

So far, I imported only csv files , is this possible?

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
December 14, 2010

It's not impossible, but neither is it particularly easy. You would need to retrieve the web page's contents using file_get_contents(), and then use PHP string functions with regular expressions to extract the data and build a SQL query.

It's a lot easier if you can get an XML feed of the data. You can then use SimpleXML to extract the data and insert it into your database.