1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Multiple CURLs and Twitter

Discussion in 'PHP & Perl' started by Saulyx, Dec 17, 2010.

  1. Saulyx

    Saulyx Junior Member

    Joined:
    Jan 10, 2010
    Messages:
    107
    Likes Received:
    5
    Hey guys, so basically I have multiple 'scrape' objects(curls) that get dynamically put into different array pockets, however upon return/login into twitter, one account is logged in, the others say

    "You cannot use the Twitter website without having JavaScript enabled on your web browser. Please re-enable JavaScript and refresh this page."

    Anyone had similar problem?
     
  2. kn1024

    kn1024 Newbie

    Joined:
    Dec 14, 2010
    Messages:
    34
    Likes Received:
    83
    So is it one was successfully logged in?
     
  3. Saulyx

    Saulyx Junior Member

    Joined:
    Jan 10, 2010
    Messages:
    107
    Likes Received:
    5
    yeah one logs in, the other ones says that JS is not enabled, but may it be that its because Im printing out several twitter windows in one window? As in, I return an array with few objects that should be both logged into twitter by that time, and then I print_r them


    Thanks
     
  4. nytrolic

    nytrolic Registered Member

    Joined:
    Oct 7, 2008
    Messages:
    86
    Likes Received:
    35
    So your logging into one account, putting the data into an array, logging out, then logging into another account and adding into the same array, then trying to print the array out with all the info after you've finished looping thru the accounts?
     
  5. Saulyx

    Saulyx Junior Member

    Joined:
    Jan 10, 2010
    Messages:
    107
    Likes Received:
    5
    no I have an array lets say
    [0] array (
    [0] => username,
    [1] => password,
    [2] => curl object(logged in, ready to do other actions as its already logged in)
    )
    [1] array (
    [0] => username2,
    [1] => password2,
    [2] => curl object2(logged in, ready to do other actions as its already logged in)
    )

    both of these objects dont get logged out until a much later state
     
  6. risefromdeath

    risefromdeath Power Member

    Joined:
    Jul 1, 2009
    Messages:
    650
    Likes Received:
    107
    as far as i can think multi curl wont work..if you are using multiple logins..instead try lopping through it with single curl
     
  7. Saulyx

    Saulyx Junior Member

    Joined:
    Jan 10, 2010
    Messages:
    107
    Likes Received:
    5
    why wouldnt they work? if their started with a new object?
     
  8. Saulyx

    Saulyx Junior Member

    Joined:
    Jan 10, 2010
    Messages:
    107
    Likes Received:
    5
    even tho i'm, getting the JS thing, I think its because I'm printing out 2-3 objects on one page, because when I dont print them out and execute a command, e.g. update status, it works fine, thanks for all the help guys.
     
  9. f0rked

    f0rked Registered Member

    Joined:
    Jan 25, 2009
    Messages:
    71
    Likes Received:
    64
    Try just printing the part of the array you need to see. Just printing the data shouldn't matter. Maybe try using the mobile version of their site, or have each cURL instance finish, and start a new one. PHP doesn't support multiple threads, so I don't see the logic of having multiple accounts logged in simultaneously.