[nycphp-talk] generating a post request from the command line

tom at tom at
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

cat file_with_vars.txt | lynx http://mysite/myscript.php -post_data

with the vars in the file in key value pairs like:

address=123 street


Can anyone confirm this?

Good Luck!


Long Island PHP Users Group

What's Tom listening to right now?  Find out here:

-----Original Message-----
From: Michael Sims [mailto:jellicle at]
Sent: Thursday, March 27, 2003 12:47 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] generating a post request from the command

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 ---

More information about the talk mailing list