468,514 Members | 1,029 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

OT (possibly): Scheduled actions

I've got a dedicated server running Windows 2003, IIS, MySQL and PHP.

I'm working on a web site which needs to pick data up on a semi-regular
basis from a CSV file which will exist in a directory accessible to this
server. The data will be put there by another server.

I need to pick up this data and insert it into a MySQL table; I have three
options in theory - do it on a strict schedule, do it on request by an admin
user (the easy option), or have it happen automatically if a file drops into
that directory.

Can PHP do this, or do I need to look at something else to do this for me? I
can install/setup anything I like on this server, within reason.

TIA.

Pete.
Jul 17 '05 #1
3 1060
In article <cv*******************@news.demon.co.uk>,
"PeteC" <ne*************@removethisbitacutecomputing.co.uk > wrote:
I've got a dedicated server running Windows 2003, IIS, MySQL and PHP.

I'm working on a web site which needs to pick data up on a semi-regular
basis from a CSV file which will exist in a directory accessible to this
server. The data will be put there by another server.

I need to pick up this data and insert it into a MySQL table; I have three
options in theory - do it on a strict schedule, do it on request by an admin
user (the easy option), or have it happen automatically if a file drops into
that directory.

Can PHP do this, or do I need to look at something else to do this for me? I
can install/setup anything I like on this server, within reason.

TIA.

Pete.


Generally, php is a server-side web formatting and programming language.
It's meant to site between a browser and a web server. It _can_ be
built as a command-line utility on UNIX but I don't know about W2003.
You're better off doing this on Linux or using Perl.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #2

"PeteC" <ne*************@removethisbitacutecomputing.co.uk > wrote in message
news:cv*******************@news.demon.co.uk...
I've got a dedicated server running Windows 2003, IIS, MySQL and PHP.

I'm working on a web site which needs to pick data up on a semi-regular
basis from a CSV file which will exist in a directory accessible to this
server. The data will be put there by another server.

I need to pick up this data and insert it into a MySQL table; I have three
options in theory - do it on a strict schedule, do it on request by an admin user (the easy option), or have it happen automatically if a file drops into that directory.

Can PHP do this, or do I need to look at something else to do this for me? I can install/setup anything I like on this server, within reason.


The elegant solution would be to write a Windows service and have it monitor
the folder containing the file and spawn an instance of PHP CLI when the
file has changed. If you know C/C++ and Windows programming, it's not that
hard. You might also be able to find an existing freeware app that does
that.

You could also use the Schedule Task feature that you will find the Control
Panel to run PHP on a schedule.

Jul 17 '05 #3
PHP can be run from Windows 2003 as a command-line utility. The idea
that PHP is not very good as a shell scripting language is incorrect -
PHP is a very useful and a very capable alternative to bash, perl etc.
It's more portable than bash (although cygwin will allow you to run
bash on windows), and easier to maintain than perl. Really, what it
comes down to is what language you know best and which you can code
quickly. If you are more comfortable using PHP, then I can't think of
a single reason to use Perl for this.

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Bart Simpson | last post: by
4 posts views Thread by Colin Steadman | last post: by
5 posts views Thread by A. Lovhaug | last post: by
6 posts views Thread by John Bowman | last post: by
1 post views Thread by satelite | last post: by
7 posts views Thread by Rob Meade | last post: by
4 posts views Thread by Jim Langston | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.