[kwlug-disc] Script question
kb at 2bits.com
Mon Mar 9 15:52:15 EDT 2009
PHP has a CLI mode (command line interpreter).
You can use argv and argc like from any other language. Just check if the
arguments are set, and then process things normally, and spit the output,
perhaps without HTML markup.
The same script can then be used from a web based application or command
See more here http://ca.php.net/features.commandline
And make sure you sanitize the input. Never trust use input in web
On Mon, Mar 9, 2009 at 3:28 PM, Insurance Squared Inc. <
gcooke at insurancesquared.com> wrote:
> I've got a web based php script I run on my webserver. It accepts, via a
> standard input form, a few variables and an input file. Then it crunches
> some numbers and sends the results as a file via email. I have a number of
> files I want to parse through this script and I want to do it locally. How
> do I effectively POST a file (I could probably change the script to accept
> GET as well, though I expect it doesn't make a difference) via a line in a
> shell script? I know how to do it with the other variables, I just do this:
> I want to repeat that numerous times as a shell script, with the file
> upload attached somehow.
> Help? :) I don't even know what to Google.
> kwlug-disc_kwlug.org mailing list
> kwlug-disc_kwlug.org at kwlug.org
Khalid M. Baheyeldin
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kwlug-disc