Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Sep 2010
    Posts
    65
    Thanks
    4
    Thanked 0 Times in 0 Posts

    How can i login to this page using cURL

    Hello,

    I'm trying to log in into this website using cURL but i'm getting HTTP/1.1 401 Unauthorized error, anyone faced such problem before??

    http://p3.grab8.com/1/

    thanks in advance

  • #2
    Regular Coder Microsuck's Avatar
    Join Date
    Oct 2011
    Location
    127.0.0.1
    Posts
    123
    Thanks
    44
    Thanked 5 Times in 5 Posts
    We're not helping you cheat people out of money.
    PHP Code:
    <?php echo "Microsuck says hi!"?>

  • #3
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,073
    Thanks
    11
    Thanked 96 Times in 94 Posts
    if you have a valid account there (in which case you aint cheating I assume) then you need curl to pass the username and password in the correct authentication type.. I dont use curl but I grabbed this of the net
    PHP Code:
    curl_setopt($chCURLOPT_HTTPAUTHCURLAUTH_BASIC);
    curl_setopt(CURLOPT_USERPWD'[username]:[password]'
    remember there are different types of AUTH e.g. basic and digest the above uses BASIC
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #4
    New Coder
    Join Date
    Sep 2010
    Posts
    65
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I'm getting this error
    Warning: Wrong parameter count for curl_setopt()
    you know how to fix this please?

    PHP Code:
    $ch curl_init();
    curl_setopt($chCURLOPT_URL'http://p3.grab8.com/1/');
    curl_setopt($chCURLOPT_RETURNTRANSFER0);
    curl_setopt($chCURLOPT_HEADER1);

    curl_setopt($chCURLOPT_HTTPAUTHCURLAUTH_BASIC);
    curl_setopt(CURLOPT_USERPWD'user:pass');

    curl_setopt($chCURLOPT_COOKIEJAR'rapid8.txt');
    curl_setopt($chCURLOPT_USERAGENT'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
    $content curl_exec($ch);
    curl_close($ch); 

  • #5
    Regular Coder Microsuck's Avatar
    Join Date
    Oct 2011
    Location
    127.0.0.1
    Posts
    123
    Thanks
    44
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by firepages View Post
    if you have a valid account there (in which case you aint cheating I assume) then you need curl to pass the username and password in the correct authentication type.. I dont use curl but I grabbed this of the net
    PHP Code:
    curl_setopt($chCURLOPT_HTTPAUTHCURLAUTH_BASIC);
    curl_setopt(CURLOPT_USERPWD'[username]:[password]'
    remember there are different types of AUTH e.g. basic and digest the above uses BASIC
    He doesn't. He stole the cookie. It's most likely in his rapid8.txt file.

    His username also doesn't help his case.
    PHP Code:
    <?php echo "Microsuck says hi!"?>


  •  

    Posting Permissions

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