Zen Cart Logo
Forums / General Questions / Severside script to automatically upload my tab delimited files to database?

Severside script to automatically upload my tab delimited files to database?

Locked

Views: 877

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
17 Dec 2009, 3:45 PM
#1
rickiesdiscount avatar

rickiesdiscount

Zen Follower

Join Date:
Jul 2008
Posts:
229
Plugin Contributions:
0

Severside script to automatically upload my tab delimited files to database?

So, i already have a script to automatically ftp my files to the temporary directory so i can insert them with easy populate,

My question is now is how to automatically insert the file into the database at a certain time of day instead of having to manually hit insert into database with easy populate

I would appreciate any help,

thanks.

17 Dec 2009, 10:49 PM
#2
rickiesdiscount avatar

rickiesdiscount

Zen Follower

Join Date:
Jul 2008
Posts:
229
Plugin Contributions:
0

Re: Severside script to automatically upload my tab delimited files to database?

I have searched the forums and i have not been able to find a solution to this in fact i have looked all over the internet and have not seen a clear solution on how to do this, i know its possible though because i know a lot of people do this...

If anyone knows anything please let me know,
thanks.

17 Dec 2009, 11:14 PM
#3
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Severside script to automatically upload my tab delimited files to database?

Change your search to 'run a PHP script using cron' that should open some new doors.

Skip

18 Dec 2009, 7:50 PM
#4
rickiesdiscount avatar

rickiesdiscount

Zen Follower

Join Date:
Jul 2008
Posts:
229
Plugin Contributions:
0

Re: Severside script to automatically upload my tab delimited files to database?

skipwater:

Change your search to 'run a PHP script using cron' that should open some new doors.

Skip

i really appreciate your help, could you be a little more specific on what you mean im not sure i know what you are saying

What do you mean change your search?

I do realize that the cron job has to run the PHP script, but i have no clue how to write the PHP script that would insert the tab delimited file is what i guess im saying

18 Dec 2009, 8:37 PM
#5
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Severside script to automatically upload my tab delimited files to database?

So, i already have a script to automatically ftp my files to the temporary directory so i can insert them with easy populate
My question is now is how to automatically insert the file into the database at a certain time of day instead of having to manually hit insert into database with easy populate

You said 'manually hit insert into database with easy populate' so all the code is already in place. Yes?

So all you need is an execute command to press the insert button.

So pass the post/get statement that the insert button would normally send with a php script that you write.

Don't forget that any script that is run with cron can not have any screen output.

I never used easy populate so I can not help you with the code.

Skip

18 Dec 2009, 9:15 PM
#6
rickiesdiscount avatar

rickiesdiscount

Zen Follower

Join Date:
Jul 2008
Posts:
229
Plugin Contributions:
0

Re: Severside script to automatically upload my tab delimited files to database?

Yeah the code is already internally within Easy populate to insert the information into the database. You just click a button into the administration panel that says insert products into database and you type the name of the Tab Delimited file beside it

The problem is i have to have the script grap each tab delimited file i want inserted and then have it automatically "click" the insert file into database

I guess ill have to look at the easy populate code to determine how it inserts the files

Has any else actually attempted to do what i am saying?

Thanks for the response i will try what you said

18 Dec 2009, 10:31 PM
#7
rickiesdiscount avatar

rickiesdiscount

Zen Follower

Join Date:
Jul 2008
Posts:
229
Plugin Contributions:
0

Re: Severside script to automatically upload my tab delimited files to database?

I figured out the section of code that inserts the file into the database from the temporary directory in easy populate

<form ENCTYPE="multipart/form-data" ACTION="easypopulate.php" METHOD="POST"> <div align = "left"> <b>Import from Temp Dir (<? echo $tempdir; ?>)</b><br /> <input TYPE="text" name="localfile" size="50"> <input type="submit" name="buttoninsert" value="Insert into db"> <br /> </div> </form>

How do i call this section of code and get it to insert my tab delimited files