Activity Stream
48,167 MEMBERS
6900 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 9 of 9
  1.     
    #1
    Member

    Default [req] Ubuntu 11.04 PHP Curl Cookie Problems

    Hi dears coders. I have a problem with PHP CURL Cookie... i am writed script and he work fine on home pc (windows 7), but when i load this script to my server (ubuntu 11.04) he did not work... cookie.txt file do not writed...

    Please Help!

    ps: sorry for my bad english...
    heppinnz Reviewed by heppinnz on . [req] Ubuntu 11.04 PHP Curl Cookie Problems Hi dears coders. I have a problem with PHP CURL Cookie... i am writed script and he work fine on home pc (windows 7), but when i load this script to my server (ubuntu 11.04) he did not work... cookie.txt file do not writed... Please Help! ps: sorry for my bad english... Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    chmod them properly !

  4.     
    #3
    Member
    chmod them properly !
    example ? i used chmod -x script.php and chmod 777 script.php ... but all this does not help ((

  5.     
    #4
    Banned
    Website's:
    worldwidexs.com.au
    If i am not wrong, it is a auto bot.

    chmod these folders with all files inside to 777

    cookies
    download
    mtn
    rar
    logs.txt


    and if any other folder or files

  6.     
    #5
    Member
    nope... i am writed info grabber from one site ... all you say I did it... but it is does not help anyway... very strange ...

  7.     
    #6
    Member
    Website's:
    sborg.us
    Post the cURL function that you're using, Or else PM if you don't wanna post it publicly!

    V3g3ta | Halcyon | Abhi

  8.     
    #7
    Member
    PHP Code: 
    function getCookie($user$pass) {
            
    $ch curl_init();
            
    curl_setopt_array($ch, array(
                
    CURLOPT_URL => 'http://blahblahblah.com/login.php',
                
    CURLOPT_RETURNTRANSFER => true,
                
    CURLOPT_COOKIEJAR => 'cookie.txt',
                
    CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2',
                
    CURLOPT_POST => true,
                
    CURLOPT_POSTFIELDS => "user=$user&password=$pass"
            
    ));
            
    curl_exec($ch);
            
    curl_close($ch);
        } 

  9.     
    #8
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Execute this code to check if the dir is writable:
    PHP Code: 
    <?php
    if (is_writable(dirname(__FILE__)) echo "Good"
    else echo "Bad";
    ?>
    If it shows "good" then try this code and see if it works:

    PHP Code: 
    function getCookie($user$pass) {
            
    $ch curl_init();
            
    curl_setopt_array($ch, array(
                
    CURLOPT_URL => 'http://blahblahblah.com/login.php',
                
    CURLOPT_RETURNTRANSFER => true,
                
    CURLOPT_COOKIEJAR => realpath('cookie.txt'),
                
    CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2',
                
    CURLOPT_POST => true,
                
    CURLOPT_POSTFIELDS => "user=$user&password=$pass"
            
    ));
            
    curl_exec($ch);
            
    curl_close($ch);
        } 
    Get the realpath of the file by using realpath function - </span></span>realpath('cookie.txt')

  10.     
    #9
    Member
    Thank you all. all is well

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. UK Cookie Law Starts This Weekend
    By Ladybbird1 in forum News & Current Events
    Replies: 4
    Last Post: 27th May 2012, 09:31 AM
  2. Need Help In cookie
    By saninokia in forum Web Development Area
    Replies: 0
    Last Post: 21st Feb 2012, 04:10 PM
  3. How to add cookie in rapidleech
    By djakil in forum Webmaster Discussion
    Replies: 5
    Last Post: 14th Jan 2011, 05:00 AM
  4. Fix the cookie problem in vB
    By Royal King in forum Tutorials and Guides
    Replies: 5
    Last Post: 7th Feb 2010, 02:28 PM
  5. C is for cookie, and that's good enough for me
    By Sp32 in forum General Discussion
    Replies: 4
    Last Post: 18th Jan 2010, 05:14 AM

Tags for this Thread

BE SOCIAL