Yogiz Posted March 15, 2008 Share Posted March 15, 2008 Hi there. I would like to extract data from a flat file into a database. The file that I'm working looks like; 1193188568.265 187 0.0.0.0 TCP_MISS/200 1983 GET http:// - DIRECT/208.69.34.231 text/html 1193188576.656 485 0.0.0.0 TCP_MISS/200 38854 GET http://- DIRECT/212.187.229.42 text/html How can I extract the data from the file and Insert into a database? Thanks. Yogiz Link to comment https://forums.phpfreaks.com/topic/96241-how-to-extract-data-from-a-file/ Share on other sites More sharing options...
trq Posted March 15, 2008 Share Posted March 15, 2008 file() and mysql_query(). Link to comment https://forums.phpfreaks.com/topic/96241-how-to-extract-data-from-a-file/#findComment-492649 Share on other sites More sharing options...
corbin Posted March 15, 2008 Share Posted March 15, 2008 Also, http://php.net/explode might help. Link to comment https://forums.phpfreaks.com/topic/96241-how-to-extract-data-from-a-file/#findComment-492652 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.