[nycphp-talk] generating a post request from the command line
tom at supertom.com
tom at supertom.com
Thu Mar 27 12:55:57 EST 2003
I haven't done it, but I have read in the past that you can do something
like:
cat file_with_vars.txt | lynx http://mysite/myscript.php -post_data
with the vars in the file in key value pairs like:
name=foobar
address=123 street
city=mycity
etc.
Can anyone confirm this?
Good Luck!
Tom
Long Island PHP Users Group
http://www.liphp.org
***************************************************
What's Tom listening to right now? Find out here:
http://www.supertom.com/viewcds.php
-----Original Message-----
From: Michael Sims [mailto:jellicle at inch.com]
Sent: Thursday, March 27, 2003 12:47 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] generating a post request from the command
line
On Thursday 27 March 2003 12:35 pm, Chris Snyder wrote:
> Does anybody know of a unix command or a perl script to generate an
> HTTP post request from stdin?
>
> I should do it in PHP, I know, but I don't want to make command-line
> PHP a requirement for my app.
The libwww-perl library should help you out. In Debian at least, it
includes /usr/bin/lwp-request , a command-line interface for all your
GET, HEAD, POST and PUT needs.
--
Michael Sims
--- Unsubscribe at http://nyphp.org/list/ ---
More information about the talk
mailing list