Page 1 of 1

Unable to parse POST submit string.....

Posted: Tue Nov 27, 2007 3:29 pm
by LovinItAll
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi,

I'm trying to write a little script that will login to Keen.com/login.asp. I have used the cURL class for creating login scripts to gmail, hotmail, etc. I always start by converting all of the the POST data (including hidden fields) into GET so I can see what I'm working with.

For example, logging into gmail, I might do something like this (below is incomplete, but I hope it expresses the general idea):

Code: Select all

$id=rawurlencode($_POST['login]);
$password=rawurlencode($_POST['login]);
$loginURL="https://www.google.com/accounts/ServiceLoginAuth";

$postFields="ltmpl=yj_blanco&ltmplcache=2&continue=http". "%3A%2F%2Fmail.google.com%2Fmail%3F&service=mail&rm". "=false&ltmpl=yj_blanco&hl=en&Email=".$id."&Passwd=". $password."&rmShown=1&null=Sign+in";
with Sign+In being the value of the submit button. And then:

Code: Select all

curl_setopt($ch, CURLOPT_POSTFIELDS,$postFields);
Well, the value of the submit button at keen.com/login.asp is (from the source) "Sign In >"

The full url is: http://www.keen.com/login.asp?ProcForm= ... 416&Join=2&
CheckCookie=1&pmode=0&from=&OrgUserEmail=&misspelledmail=&
hidErrorCode=&hidbEmail=&username=(the user's name)&password=(the user's password)&login= WHAT?!

What simple thing am I missing here? I copied and pasted the converted POST, the other stuff I sort of winged, so there may be a syntactical error or two.

Any ideas? Thanks......


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Wed Nov 28, 2007 12:01 pm
by LovinItAll
Sorry about that...I should have read the stickies first. I think I was in frustration zone "RED" when I posted. I will post my new code in just a bit. I've fixed one problem, but now I'm having a problem handling the cookies.

One again, my apologies....