cURL / Mailing Lists / curl-users / Single Mail

curl-users

Maintaining session with Post

From: Spammed TooMuch <spamcolator_at_yahoo.com>
Date: Tue, 23 Jan 2007 20:26:27 -0800 (PST)

Hi,
   
  I've used curl to get stats from a network device by giving both the front page URL that requires authentication and the URL for the page I really want, as in
   
  curl -u admin:admin --url http://192.168.0.1 --url http://192.168.0.1/foo.htm
   
  This allows me to get session started and then get the second page with the authentication. However, now I want to do a Post and can't figure out how to do it. The first think I tried was to simply replace the second url with the post options and action URL:
   
  curl -u admin:admin --url http://192.168.0.1 -d "CFM=submit&ABC=1" http://192.168.0.1/DOACTION
   
  It is strange, and not mentioned why, that when faking a post you don't use the --url; every example has just the URL without the CLI keyword. Tried passing the login info as part of 1 or both URLs. Saving cookies with -D or -b and then using -c in a second curl call doesn't help.
   
  I think I've read every page on the curl home site today! And googled till my eyes glazed over. Any help would be appreciated.
   
  cheers,
  Chuck
   

 
---------------------------------
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.
Received on 2007-01-24