
This is a discussion on [Tutorial] Curl Login within the PHP forums, part of the Program Your Site category; ill be making a detailed regex tutorial...
| |||||||
| 57 Online | Register | Projects | Products | Members List | Calendar | Today's Posts | Search |
| |||
| Using Curl For Cj Hi Chad! i'd like to know if you can help me. I'm trying to login Commission Junction - A Global Leader in Affiliate Marketing, Online Advertising and Search Engine Marketing but it's so hard for me. I've tried with this url and this other one: https://members.cj.com/member/publisher/home.do that is the login page The 2 both url have different POST data i have to send, these POST's data are: Code: uname=REMOVED&pw=REMOVED&submit.x=19&submit.y=5 Code: uname=REMOVED&pw=REMOVED&nextpage=&go=Go Well, I've seen the first POST data i wrote change temporaly. Where you see the "19" and the "5" sometimes change. But the second POST data i wrote to you is the same always, you just need to write your id and pass. But anyway, i think the problem is for the COOKIE. When i intercept the data using ACHILLES i can see something like: Code: Cookie: cjlocale=en_US; __utma=xxxxxxxxx.xxxxxxxxxxx.xxxxxxxxxxxxx.xxxxxxxxxxxx.xxxxxxx.xxx; __utmz=xxxxxxxxx.xxxxxxxxxxx.xx.x.utmccn=(referral)|utmcsr=uk.cj.com|utmcct=/|utmcmd=referral; __utmb=xxxxxxxxx; CONTID=xxxxxxx; __utmc=xxxxxxxxxx This data changes temporaly too and sometimes include the JSESSIONID code I've tested a lot of combination of these cookies with all the CURL's functions and i can't login. Always the browser shows me the CJ login form again. As information, yesterday, i did the perfect code and it has worked fine for me, but that was just a newbie lucky because when i lost the session i wasn't be ables to login again. I've just changed the session and cookie values but it doesn't work. Now, as i said, i've tested a lot of combination, even passing the utm... values i wrote above by adding the CURLOPT_COOKIE function and it doesnt't work neither. Can u help me by saying to me what i have to write in your code to make it works perfectly for cj.com??? Thank you in advance. Reinaldo. P.D.: Sorry for my english, i know it isn't very good. |
| |||
| Quote:
The postfileds data i have to send in cj.com changes, but that's ok no problem and even the postfield data that i have to send to https://members.cj.com/member/login (that is basically the same login page) don't changes, this is better than the first one. The problem is another one, i think it is about COOKIES. When i try your code and all the codes i've been testing i can see the following line in the cookie file grabbed by COOKIEJAR function: members.cj.com FALSE / FALSE 0 JSESSIONID xxxxxxxxxxx I think this line means that CURL is logging in satisfactorily because the this cookie shows me a JSESSIONID value. When the code fails a FALSE value is shown instead the JSESSIONID value. Well, even showing the JSESSIONID value, CURL can't show me the page that i'm looking for inside the login form. I think this problem is for COOKIE values, when i intercept the data, i can see my browser is sending to CJ server utma, utmc, utmz, utmb values and even sometimes the JSESSIONID as a cookie value. Intercepting the data a lot of times, i can see this utmX values appear ramdomly. I mean, sometimes appears the utmb cookie and some other times not and it is the same for utmc, JSESSIONID and a cookie named cjuMember. This values appears ramdomly even in the same session. I'm trying to pass this __utmX values by using the CURLOPT_COOKIE function but it still not working. Do you know about the utmX cookie values and how can i pass this data to the session created by CURL??? Thank you in advance. Reinaldo. |
| |||
| hmm I am also just starting to loggin with cookies/curl. I had a little bit similar problem as you had above. I needed to log in monsterboard.nl ( ssl hiring ). I did the following thing and it worked. step 1: Quote:
This should do the job. |
![]() |
| |