You are here: Re: automated upload with PHP « PHP Programming Language « IT news, forums, messages
Re: automated upload with PHP

Posted by Steve Poe on 03/30/07 18:57

On Mar 30, 1:37 am, "shimmyshack" <matt.fa...@gmail.com> wrote:
> On 30 Mar, 04:49, "Aerik" <asyl...@gmail.com> wrote:
>
>
>
> > On Mar 29, 8:29 pm, "Steve Poe" <steve....@gmail.com> wrote:
>
> > > > > sure, you can script on the client using what is called active
> > > > > scripting.
> > > > > its nice and familiar, so you would either
> > > > > 1) have your script one once per day and upload any images not already
> > > > > uploaded from a set of folders
> > > > > 2) configure explorer so you can right click and select upload image,
> > > > > your php script would be run in the bvackground with argument such as
> > > > > c:\path\to\php -r "%1"
> > > > > and it would do the rest.
> > > > > Why not use FTP if you are scripting this, as it will be nice and
> > > > > robust and can interact is a predicatable way with your fileserver -
> > > > > providing it can have an ftp serve running on it, like filezilla
> > > > > server.
>
> > > > oops I should have added, that if you have a few computers you need to
> > > > install this on you could use NSIS (Nullsoft Scriptable Install
> > > > System)http://nsis.sourceforge.net/Main_Pagetowrapupeverything
> > > > including the script that makes the right click functionality between
> > > > tiffs and the php script, and distribute that.
>
> > > Thanks for your help (and the link). I am not familar with
> > > implementing
> > > FTP through PHP. It's mainly PHP with HTML forms. The PHP app runs on
> > > a
> > > Linux box (hopefully this does not matter) and I believe it also has
> > > ftp access. At this point, there will only be one computer that the
> > > PHP application will need to automatically load
> > > the TIF image. The file will be saved in a directory called xrays off
> > > of the C:\
> > > drive.
>
> > > Steve
>
> > Hi Steve -
> > Would it suit your requirement to hard code the path into the file
> > upload box? The user still has to click "upload" but will not have to
> > find the file each time.
>
> > Aerik
>
> active scripting is slightly different, it will run on the windows box
> where the tiffs are. php on the linux server isnt used at all. I
> thought you question was really about "automatic form submission" but
> this isnt allowed for security, so you have to program on the client
> computer itself. You can do this in any language of course, and
> because you seemed familiar with php, I just thought why not use php
> on the client too.
> For instance, my desktop here does a whole load of things at night,
> all using php. It scans direcories and uploads files to an ftp server,
> backs stuff up, copies files, and logs the results.
>
> What I would do is
> a) download and use a file/folder watcher like log monitorhttp://www.freeware-guide.com/download/index2.html
> b) set it to automatically run a program (like copy blah to network
> drive blah) which uploads the changes
> c) write a small program that takes a path and filename and uploads it
> to the linux machine over ftp, or if you script using c#, you can just
> copy the file there using a mapped drive and samba.
>
> You dont need your users to interact with this process. It is done
> automatically. If the images need to get to the file server in real
> time, then you can use the watcher, otherwise you can run cronw 2
> (sourceforge) to sweep them all there at night.
>
> The reason I keep steering away from http uploads is because they tend
> not to be as robust as ftp. FTP can support resume, and other nice
> features like compression, (if your code does). You can though script
> an automatic form upload using c# or php or whatever, which is just a
> script - rather than one that runs in a browser. If you like c#
> or .NET check out codeproject for more

Thanks. I am not ready for C# yet (but, I've started reading about
Mono). While I am not new to PHP, I humblely admit my coding skills
are novice-like. I program enough to fix the program for the first-
stage before my boss has me on some other I.T-related project.

Thanks again.

Steve

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация