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. Quote 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? Quote 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. Quote 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); Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/239498-csv-to-database/#findComment-1230318 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.