Jump to content

Automate Import


vip3r

Recommended Posts

I have this problem, I have a working MySQL database that is compiled from a text file. New information arrives every hour or sooner via ftp in the form of a new csv text file. I can only get the information via a text file no other way is possible since it comes from an old legacy app. The problem is the webserver and mysql server are on two different systems. I don't have access to the OS to run any crons, I have access to the http direct and to the mysql prompt on the mysql server. I have a php script that will load the text file into the mysql database. How can I automate this script and how can I have the script not update if the csv file is the same?

Link to comment
https://forums.phpfreaks.com/topic/3031-automate-import/
Share on other sites

I'm not sure how you're going to get around the cron requirement -- I don't even think that you can make system calls with UDFs. Maybe you can rig it up via a third server which has access to both of the other ones?

 

However, you could easily check the timestamp and/or filesize on the csv file being dumped via FTP to confirm that it's new.

Link to comment
https://forums.phpfreaks.com/topic/3031-automate-import/#findComment-10351
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.