Doyley Posted June 4, 2008 Share Posted June 4, 2008 Hi all, Bit of a strange one. I have generated a csv file from a MySQL database, I now need that csv file to be saved on the users machine with as little interaction as possible. It will be the same filename and same location everytime. Basically I want to give them a button that says "Generate", once they have hit it they can go to c:/somefolder and the file will be their waiting for them. I was thinking of maybe an activex control or something similar but I really don't know what I'm doing with them so I'm just guessing. Thanks! Quote Link to comment Share on other sites More sharing options...
craygo Posted June 4, 2008 Share Posted June 4, 2008 You won't be able to do this with php. You can probably go as far as hitting generate and then a window will pop up asking the user where he wants to save the file. But there won't be a way to automatically save it somewhere on the users pc. Ray Quote Link to comment Share on other sites More sharing options...
Doyley Posted June 4, 2008 Author Share Posted June 4, 2008 I thought as much. Thanks! Quote Link to comment Share on other sites More sharing options...
Doyley Posted June 5, 2008 Author Share Posted June 5, 2008 I was just thinking more about this.... All the people that would use this are based in our office, there is only a handful of them. If I install an FTP server on each of their PC's and use PHP's FTP commands would that work? Quote Link to comment Share on other sites More sharing options...
Doyley Posted June 5, 2008 Author Share Posted June 5, 2008 Balls that wouldn't work, the server is outside of our internal network so I would only be able to configure the router to route ftp to one machine. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 5, 2008 Share Posted June 5, 2008 Just live with the fact that you need a Download This... window. =/ That's how browsers work, otherwise, what stops malicious sites from "just sending files with little user interaction"? Quote Link to comment Share on other sites More sharing options...
Doyley Posted June 5, 2008 Author Share Posted June 5, 2008 Yeah I would love to, doesn't stop my client nibbling at my ear though lol. Thanks for your input! Quote Link to comment 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.