jmr3460 Posted June 16, 2011 Share Posted June 16, 2011 Hello all, Not sure if can be done, but looking for starting point. RSS feed not working on a site that I am not getting any support on, so I am looking for another way. I want to download a CSV file to a folder then open and read it then insert information into a database. My question is "Is there a function that would help me to download this CVS file into a specific folder? Thanks for any help. Link to comment https://forums.phpfreaks.com/topic/239498-csv-to-database/ Share on other sites More sharing options...
btherl Posted June 16, 2011 Share Posted June 16, 2011 Is this CSV file available via an HTTP request? Link to comment https://forums.phpfreaks.com/topic/239498-csv-to-database/#findComment-1230302 Share on other sites More sharing options...
jmr3460 Posted June 16, 2011 Author Share Posted June 16, 2011 Yes it is. Link to comment https://forums.phpfreaks.com/topic/239498-csv-to-database/#findComment-1230310 Share on other sites More sharing options...
btherl Posted June 16, 2011 Share Posted June 16, 2011 Ok, the simplest way is probably like this: $csv = file_get_contents("http://www.domain.com/file.csv"); file_put_contents("file.csv", $csv); Link to comment https://forums.phpfreaks.com/topic/239498-csv-to-database/#findComment-1230314 Share on other sites More sharing options...
jmr3460 Posted June 16, 2011 Author Share Posted June 16, 2011 OK thanks I will start with that. Link to comment https://forums.phpfreaks.com/topic/239498-csv-to-database/#findComment-1230318 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.