Results 1 to 3 of 3
  1. #1

    Question PHP cURL problem

    I'm trying to make a PHP cURL login script so that my PHP script could get data from the site only available for logged users.

    But there seems to be some problem in my script. It throws me back to the login page with some changes in the url. I noticed that it does the exactly same with my browser if I disable cookies so I assume that the problem is with the cookies.

    The login page sends 2 cookies in the referer. Both expire at end of session.

    Ok enough explaining here's my code:

    PHP Code:
    $ch2 curl_init();

    $result=curl_exec ($ch2);
    curl_close ($ch2); 

    So what could be the problem?

    (Just so that I don't have to say this in later posts: I have tried finding answer for this on Google and one forum already. Didn't find any help.)

  2. #2


    Hmm my problem changed a bit. Can't explain it :/ so nvm.
    Last edited by Izuom; 12-14-2006 at 09:38 AM.

  3. #3
    Join Date
    Sep 2004
    Are you connecting to an .aspx page? If so, you have to get the login form, extract the __VIEWSTATE form element value, and include that when you log in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts