maintaining form post session using curl

Login or Register to Reply

Thread Tools Search this Thread
# 1  
Old 01-13-2009
maintaining form post session using curl


I have searched for a good part of the day, but cannot seem to find an answer to this. I hope this is an appropriate forum for my question.

I am wanting to download a blog web page using a script. It requires username and password login. I have tried the following (an example) to no avail:

curl -d username=username -d password=password http://siteurl/index.php

I then tried this hoping that I could get the session started and then go to the page:

curl -d username=username -d password=password --url http://siteurl/index.php --url http://siteurl/desired_page.php

and the same as above using -u username:password instead of -d

I get the pages but I am not logged in. I have tried these methods on other pages using post forms for passwords and it works fine. I have checked to the source of the login pages and I am using the correct name values for password and username. I am trying to download pages that are privy only to members, and I cannot download them

I don't believe the site is using cookies to remember my login info for a session because when I log in and out using firefox, my cookie list does not change.

Does anyone have any ideas what is happing with this?

Last edited by Allasso; 01-14-2009 at 08:19 AM.. Reason: removed auto parsing of URLs and smilies (at least I tried anyway...)
# 2  
Old 01-13-2009
update ( this is not a bump - I just discovered some new information )

I noticed that I can create a dummy html login page with just a form where I submit the same information, and can log into the index page just fine.

I cannot understand then why what I have tried using curl does not work, since it works on other sites I have tried it on.

I double checked the names and values and they are correct.
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
CURL - Post Form Isssue ( sequel ) Fred13 Web Development 4 2 Weeks Ago 12:33 PM
Curl - post form issue Fred13 Web Development 3 2 Weeks Ago 06:11 AM
How to post content file of data using curl? fajar_3t3 Shell Programming and Scripting 0 03-19-2018 01:33 AM
Wget and curl to post data SkySmart Shell Programming and Scripting 1 10-12-2016 06:03 PM
How to use cURL to download web page with autentification (form)? MarcelOrMittal UNIX for Beginners Questions & Answers 1 08-04-2016 12:15 PM
Curl command to post headers dineshaila Shell Programming and Scripting 1 05-26-2016 01:28 PM
Data Post with curl iddfcr Web Development 1 11-17-2014 11:34 AM
Curl Script - Post a file (multipart/form-data) Anooja G Shell Programming and Scripting 0 04-28-2014 09:08 AM
Informatica post session shell script nag_sathi Shell Programming and Scripting 1 05-17-2013 04:38 PM
Using cURL to submit a post form hansvg Shell Programming and Scripting 2 07-24-2012 03:50 PM
Posting data to a form using curl DeCoTwc UNIX for Dummies Questions & Answers 0 05-30-2010 04:34 AM
Issue in Curl to send http POST request with attachment/multipart manishmaha UNIX for Advanced & Expert Users 1 05-19-2010 02:12 AM
Changing Unix form to Microsoft Word form to be able to email it to someone. Cheraunm UNIX for Advanced & Expert Users 8 05-24-2002 04:58 AM