How can i post myspace.com Comments , help me

Help
Ansar
2007-02-22
2013-05-30
  • Ansar
    Ansar
    2007-02-22

    Hi,
    I am trying to post a comment to myspace.com, but the page displays the confirmation page please help me to complete the task.

    the php code i used with login datils is listed bellow

    <?php

    include("Snoopy.class.php");

    $snoopy = new Snoopy;

    // need an proxy?:
    //$snoopy->proxy_host = "my.proxy.host";
    //$snoopy->proxy_port = "8080";

    // set browser and referer:
    $snoopy->agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
    $snoopy->referer = "http://www.myspace.com/";

    // set some cookies:
    $snoopy->cookies["SessionID"] = '238472834723489';
    $snoopy->cookies["favoriteColor"] = "blue";

    // set an raw-header:
    $snoopy->rawheaders["Pragma"] = "no-cache";

    // set some internal variables:
    $snoopy->maxredirs = 4;
    $snoopy->offsiteok = true;
    $snoopy->expandlinks = true;

    // set username and password (optional)
    //$snoopy->user = "ansar@ispg.in";
    //$snoopy->pass = "abcdef1";
    $formvars["email"]    =    "ansar@ispg.in";
    $formvars["password"]    =    "abcdef1";
    $formvars["ctl00$Main$SplashDisplay$login$loginbutton"]    =    "";
    // fetch the text of the website www.google.com:
    if($snoopy->submit("http://login.myspace.com/index.cfm?fuseaction=login.process&MyToken=c8713d78-4004-49dd-8b93-a44258fb954f",$formvars)){
        // other methods: fetch, fetchform, fetchlinks, submittext and submitlinks
       
        // response code:
        print "response code: ".$snoopy->response_code."<br/>\n";
       
        // print the headers:
       
      // print the texts of the website:
        print $snoopy->results;
       
    }
    else {
        print "Snoopy: error while fetching document: ".$snoopy->error."\n";
    }
        $formvars["f_comments"]    =    "Welcome";
    // fetch the text of the website www.google.com:
    if($snoopy->submit("http://comment.myspace.com/Modules/Comments/Pages/PostComment.aspx?%3ffuseaction=user.ConfirmComment&friendID=152095199&MyToken=e6a1786e-81a0-4611-9395-5d9f120ddebd",$formvars)){
        // other methods: fetch, fetchform, fetchlinks, submittext and submitlinks
       
        // response code:
        print "response code: ".$snoopy->response_code."<br/>\n";
       
        // print the headers:
       
      // print the texts of the website:
        print $snoopy->results;
       
    }
    else {
        print "Snoopy: error while fetching document: ".$snoopy->error."\n";
    }
    ?>

     
    • Skyler
      Skyler
      2007-02-22

      For one thing, your proxy settings are a sample, and aren't meant to be used. "my.proxy.host" doesn't exist, so it can't use it as a proxy.

      Your problem is that you are only posting to the confirmation page. You need to use the same basic principle, to post a 'Submit' from the confirmation page, as if the button was clicked.

      When posting a comment on myspace manually, you have to click the confirmation button. So why would it be different when using a script to do it?