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

cURL and myspace looking to make a bot

Discussion in 'PHP & Perl' started by JesterJoker, Jun 17, 2010.

  1. JesterJoker

    JesterJoker Regular Member

    Joined:
    Jan 13, 2008
    Messages:
    237
    Likes Received:
    28
    I have messed with imacros, and I think most of the stuff can be automated without having to see the stuff on the screen.

    I found a few codes for logging into facebook and updating status , but didn't see much for logging into myspace.


    Anyone have a

    1- myspace login curl script, that I might be able to finesse into a sort of friend blasting bot?

    I kinda want to update my 15 profiles at once, or make one that creates myspace accounts.

    should i be looking into visual studio instead?


    any push in the right direction would be great.
     
  2. f0rked

    f0rked Registered Member

    Joined:
    Jan 25, 2009
    Messages:
    71
    Likes Received:
    64
    PHP:
    <?php

    class Myspace
    {
        function 
    login($username$password)
        {
            
    $username $_POST['user'];
            
    $password $_POST['passwd'];
            
            
    $login_url "https://secure.myspace.com/index.cfm?fuseaction=login.process";
            
    $post_data "ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24Email_Textbox=$username&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24Password_Textbox=$password";
            
            
    $ch curl_init($login_url);
            
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
            
    curl_setopt($chCURLOPT_URL$login_url);
            
    curl_setopt($chCURLOPT_FOLLOWLOCATION1);
            
    curl_setopt($chCURLOPT_AUTOREFERER1);
            
    curl_setopt($chCURLOPT_CONNECTTIMEOUT10);
            
    curl_setopt($chCURLOPT_MAXREDIRS10);
            
    curl_setopt($chCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) ");
            
    curl_setopt($chCURLOPT_COOKIEJAR"cookie.txt");
            
    curl_setopt($chCURLOPT_POST1);
            
    curl_setopt($chCURLOPT_POSTFIELDS,$post_data);
            
          
    curl_setopt ($chCURLOPT_SSL_VERIFYHOST0);
          
    curl_setopt ($chCURLOPT_SSL_VERIFYPEER0); 

            
    $result curl_exec($ch);
            
            
            
    curl_close($ch);
            echo 
    $result;
        }
    }

    if(
    $_POST['user'] && $_POST['passwd'])
    {
        
    $login = new Myspace;
        
        echo 
    $login->login($_POST['user'],$_POST['passwd']);
        
    }
    else
    {
        echo
            
    "<html>
            <body>
            <form action='' method='POST'>
            <input type='text' name='user' /><br />
            <input type='password' name='passwd' /><br />
            <input type='submit' value='submit' />
            </form>
            
            </form>
            </body>
            </html>"
    ;
    }

    ?> 
    pretty basic, i forget where i found this, but used this as the base of something similar. if you have any questions about going about doing what you're looking into, feel free to drop me a PM.
     
  3. madblacker

    madblacker Regular Member

    Joined:
    Nov 2, 2009
    Messages:
    268
    Likes Received:
    19
    No, don't look into visual studio, php curl is perfect for this, the only real part that presents any challenge is the captcha in the account creation but its just since you need to use a 3rd part api to get the captcha data...

    and also imacros is crap compared to php curl, I used to use it too but it just got to be too frustrating with how slow it was and some issues with it being really really slow when calling it from php so I learned curl and I have to say its much better but it takes a while to learn everything since you most likely want to learn how to use a database to go with it, I recommend using a php framework to make things more organized in building your scripts
     
  4. JesterJoker

    JesterJoker Regular Member

    Joined:
    Jan 13, 2008
    Messages:
    237
    Likes Received:
    28
    I had programm create me a friendblaster pro captcha program, but I see the API on the decaptcher site. It looks very easy to implement this in.

    I'll message you guys about this.

    If either of you are still interested.