Help: The Yahoo Registration form is Eating my Sanity

Status
Not open for further replies.

xmcp123

New member
Sep 20, 2007
4,145
95
0
Not Louisiana
www.slightlyshadyseo.com
Ok. So this should not be as difficult as it's appearing it is. But I'm stumped, so I thought I'd appeal to the greater WF for help on this one. I know one of you mofos finished a yahoo account registration bot.
Ok. So my bot allows for manual input for the captcha(at least for now)
Step 1: Entering the Captcha
2cdv21z.jpg

(see, it's entered correctly)

Step 2: Yahoo Lies to Me
23wjzi1.jpg



What I've Tried So Far
  1. Javascript-disabled signups ARE allowed. But I've tried switching the value jsenabled back and forth from 0 to 1.
  2. The script downloads(recursively) EVERY associated CSS, Javascript, background image, normal image, etc. Parses HTML and CSS to find them. Can't parse JS, but in theory a JS disabled signup can work, so...
  3. The script's postdata appears to be identical to the sign up form.
  4. There's an extra cookie or two on the reg form(can't find where they come from), but if it's not JS/an image/a CSS? It may just be for their advertisement serving.
  5. The registration links are properly extracted, as is the submit locations.
  6. Yes, it loads the same cookie on the 2 different screens. It's arranged by unique ID that's passed from one to the other, so I'm sure it's not overwritten.
  7. I tried requesting the captcha twice and saving to 2 different files. Theory was if the cookies weren't carrying right, they'd save different results. They were identical, so all appears to be well.
Detailed Info ( Note - I used an asterisk to black out stuff that could identify my requests)

u=3enaha***ek9vj
dracs=
t=PF0z7WrIujwvujUHDAnNGMnb97U16.*****.YFoxlFt_fI0rlvkArfWOZ6OlUoH1VnXCMJjDtDbf7_nUG2w**************G_mF3QHrWA.qDu9Ruxl8XhbB34F5EGMUdGSkr8KW9LS.x3bRX0gO4To74fqwMV4KDuqpPXlkJJs92GDPrvJV1_34wdwUnpvm1CVl2lVKVAFU6dc_Ubo34gotQjDJdHKnV47YjAQC60LA--~B
done=http://mail.yahoo.com
last=
partner=yahoo_default
intl=us
src=ym
.scrumb=
jsenabled=0
exitSurveyEnabled=0
preferredcontent=us
firstname=Kwedders
secondname=Bertram
gender=m
mm=2
dd=12
yyyy=1977
country=us
postalcode=48654
yahooid=TBritishWXB73
domain=yahoo.com
password=thiscouldbeapass
passwordconfirm=thiscouldbeapass
altemail=
secquestion=What is the last name of your favorite musician?
secquestionanswer=Censored
cword=BFrcn7Bc
cdata=WyMvaOJZFekOKjGCUnq45VLjDG3nY****************.SNBBxGbtyiispHGqYzczAKw7z0D8hRF3ytShzkHIWBvd0A-
cadata=
showc=1
tos_agreed=y
IAgreeBtn=Create My Account


Outbound Header:
POST /registration;_ylt=AnX0oQjiYT****SRaNyC_OZ2PAI HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Host: edit.yahoo.com
Accept: */*
Referer: https://edit.yahoo.com/config/eval_register?.intl=us&new=1&.done=http%3A//mail.yahoo.com&.src=ym&.v=0&.u=14eiit1**k9vb&partner=&.partner=&pkg=&stepid=&.p=&promo=&.last=
Cookie: B=114aap5**i5p7&b=3&s=ta
Content-Length: 875
Content-Type: application/x-www-form-urlencoded

(post data here)

So for fucks sake, if any of you guys have done this before and know whatever bizarre thing yahoo is doing, throw me a bone?
I'm sure it's something stupid on my part, but that doesn't make it less maddening.
 


Just food for thought, I did read on syndik8 that some other popular form won't submit properly if the google analytics tracking code isn't passed as well. I doubt Yahoo is using GA, but maybe there's something else that's not immediately part of their own header that they're checking for.
 
Just food for thought, I did read on syndik8 that some other popular form won't submit properly if the google analytics tracking code isn't passed as well. I doubt Yahoo is using GA, but maybe there's something else that's not immediately part of their own header that they're checking for.
Well, that would mean I couldn't register without JS, but I've done it w/o JS using firefox. Also, it downloads all the javascript files anyways :\
Thanks though. This is driving me nuts.
Edit: On second thought, it must be something similar. Flash maybe?
 
Are you POSTing to the registration page with the same cookie as you used to get the CAPTCHA? RE-CAPTCHA doesn't require that, but the digg CAPTCHA does for example.

To explain further:

1. GET the registration page and save a copy of the CAPTCHA. If you're using curl use CURLOPT_COOKIEJAR and save the cookie to /tmp/cookie.tmp or whatever
2. POST to the registration page, and make sure you use the same cookie jar.

If you're already doing that let me know and I'll take a crack at it myself - I know how frustrating these can be.

Cheers,

Leon
 
Are you POSTing to the registration page with the same cookie as you used to get the CAPTCHA? RE-CAPTCHA doesn't require that, but the digg CAPTCHA does for example.

To explain further:

1. GET the registration page and save a copy of the CAPTCHA. If you're using curl use CURLOPT_COOKIEJAR and save the cookie to /tmp/cookie.tmp or whatever
2. POST to the registration page, and make sure you use the same cookie jar.

If you're already doing that let me know and I'll take a crack at it myself - I know how frustrating these can be.

Cheers,

Leon
Yup, the cookie is the same when requesting the captcha.
 
I managed to get it to work. The process I used was:

1. Go to https://edit.yahoo.com/registration?.intl=us&new=1&.done=http%3A//mail.yahoo.com&.src=ym and scrape the page
2. Save the hidden fields and the captcha image to disk
3. Open the image you saved and read the captcha
4. Post to the registration page with the text of the captcha you just read, and the hidden fields you just saved. You actually don't need the same Cookie, I was wrong about that - you just need to make sure you are posting the hidden fields and the captcha text that coincide. Here's the PHP I was using:
Code:
Too long-will post separately
Once you run that you'll see something like Saved image to D:\WINDOWS\system32\config\systemprofile\Local Settings\Temp\IMG368F.tmp. Go find that file, change the extension to jpg and read the captcha. Then run
Code:
 $social_post->yahoo_do_reg('368F');
where 368F matches the name from the previous screen. Of course you'll need to change the postfields. That's just a quick hack together - you'll probably want to save everything in a db.

Hope that helps,

Leon
 
Here's the main code:
Code:
/*
* Curl class
*/
class curl_class{
    
    function curl_class(){ $this->__construct($array=null); }
    function __construct($array=null) {
    
        /*
        Fill class with default variables
        */    
        if(is_array($array)) {
            foreach($array AS $key=>$value) {
            $this->$key = $value;
            }
        }    
        
        /*
        Specify cookie file
        */    
        if(!$this->cookie){
            $this->cookie = tempnam("tmp","COOK");
        }
        
        /*
        Default user agent
        */            
        if(!$this->user_agent) {            
            $this->user_agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)';        
        }

        /*
        Init curl
        */        
        $this->curl = curl_init();
        
        $this->configCurl(CURLOPT_SSL_VERIFYPEER, 0);
        $this->configCurl(CURLOPT_SSL_VERIFYHOST, 0);
        $this->configCurl(CURLOPT_RETURNTRANSFER, 1);
        $this->configCurl(CURLOPT_AUTOREFERER, 1);
        $this->configCurl(CURLOPT_COOKIEFILE, $this->cookie);
        $this->configCurl(CURLOPT_COOKIEJAR, $this->cookie);        
        
        if($this->ajax) {
            $str[]  = "X-Requested-With: XMLHttpRequest";
        }
        
        if($this->prototype) {
            $str[]  = "X-Prototype-Version: ". $this->prototype;
        }        
        
        if($this->prototype || $this->ajax) {        
             $this->configCurl(CURLOPT_HTTPHEADER, $str);
        }
                
        if($this->debug) {
        $GLOBALS['fd'] = fopen($_SERVER['DOCUMENT_ROOT']."/webadmin/log/" . "error.txt", "a+");
        $this->configCurl(CURLOPT_VERBOSE, 1);    
        $this->configCurl(CURLOPT_STDERR, $GLOBALS['fd']);    
        }
        
        /*
        Set timeout/
        */            
        $this->setTimeout($this->connect,$this->transfer);


    }

    /*
    Set a curl option
    */    
    function configCurl($option, $value){
        return @curl_setopt ($this->curl, $option, $value);
    }


    /*
    Set curl timeout
    */    
    function setTimeout($connect=20, $transfer=10) {
    
        $this->configCurl(CURLOPT_CONNECTTIMEOUT, $connect);    
        $this->configCurl(CURLOPT_TIMEOUT, $transfer);    


    }

    /*
    Return curl error
    */    
    function get_error_code() {

        return curl_errno($this->curl) ? curl_error($this->curl) : false;

    }


    /*
    Return page http code
    */    
    function get_response_code() {

        return curl_getinfo($this->curl, CURLINFO_HTTP_CODE);

    }


    /*
    HTTP authentication
    */    
    function auth($user, $pass) {

        $this->authinfo = "$user:$pass";        

    }

    /*
    POST function
    */    
    function post($url, $referer = '', $post_string=null) {
    
        //Reset options (but using same cookie)
        $this->__construct();    

        $this->url = $url;
        $this->post_string = $post_string;
                
        //Set curl options
        $this->configCurl(CURLOPT_URL, $this->url);    
        $this->configCurl(CURLOPT_POSTFIELDS, $this->post_string);    
        
        if($this->authinfo) {
            $this->configCurl(CURLOPT_USERPWD,$this->authinfo);                
        }        
    
        //Set ref
        if($referer){
            $this->configCurl(CURLOPT_REFERER, $referer);    
        }


        //Do we need to follow manually?
        if($this->nofollow) {
            $this->configCurl(CURLOPT_FOLLOWLOCATION, false);            
        } else {        
            $this->follow_manually = !$this->configCurl(CURLOPT_FOLLOWLOCATION, true);                    
        }

        

        $page = curl_exec($this->curl);
        $error = curl_errno($this->curl);    

        if ($error != CURLE_OK || empty($page)) {

            return false;

        }        
        
        if($this->follow_manually) {
        return $this->manual_follow($page);
        } else {
        return $page;        
        }



    }

    /*
    GET function
    */    
    function get($url, $referer = '') {
        
        //Reset options (but using same cookie)
        $this->__construct();

        //Set curl options
        $this->configCurl(CURLOPT_URL, $url);    
        
        if($this->authinfo) {
            $this->configCurl(CURLOPT_USERPWD,$this->authinfo);                
        }        
    
        //Set ref
        if($referer){
            $this->configCurl(CURLOPT_REFERER, $referer);    
        }


        //Do we need to follow manually?
        if($this->nofollow) {
            $this->configCurl(CURLOPT_FOLLOWLOCATION, false);            
        } else {        
            $this->follow_manually = !$this->configCurl(CURLOPT_FOLLOWLOCATION, true);                    
        }


        $page = curl_exec($this->curl);
        $error = curl_errno($this->curl);    

        if ($error != CURLE_OK || empty($page)) {

            return false;

        }        
        
        if($this->follow_manually) {
        return $this->manual_follow($page);
        } else {
        return $page;        
        }

    }

    /*
    Read headers to follow a location manually
    */        
    function manual_follow($page) {
    
    //Need header for this
    $this->configCurl(CURLOPT_HEADER, 1);
    
    //Check is follow
    if(substr($this->get_response_code(),0,2) != "30") {
    $this->follow_url = "";
    } else {    
    preg_match("@Location:(.*?)\n@i", $page, $matches);
    $this->follow_url = trim($matches[1]);    
    }
    
    if($this->follow_url) {
    return $this->get($this->follow_url);
    } else {
    return $page;
    }
    
    
    }



};
//-----------------------------------------------------------------

class social_post {

    //Constructor
    function social_post(){ $this->__construct(); }
    function __construct($array=null) {    
        if(is_array($array)) {
            foreach($array AS $key=>$value) {
            $this->$key = $value;
            }
        }
    }
    
    /**
    Get fields in a page
    */
    function get_hiddens($page,$type='hidden') {
    
        preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$page,$elements);
    
        if(is_array($elements[0])) {
        
            foreach($elements[0] AS $key=>$value) {
                
                if(preg_match("@type=('|\")?$type@",$value)) {
                    
                    preg_match_all("@(name|value)=('|\")?([^('|\"|>|\s)]+)@",$value,$matches);
                    if(is_array($matches)) {
                    $return[$matches[3][0]] = $matches[3][1];
                    }
                
                }
            
            }
        
        }
        
        return $return;
    
    
    }        

    function yahoo_get_reg_page() {
    
    //Get page
    $page = $this->curl->get('https://edit.yahoo.com/registration?.intl=us&new=1&.done=http%3A//mail.yahoo.com&.src=ym','http://www.yahoo.com/');
    
    //Get hidden fields
    $this->hiddens = $this->get_hiddens($page);

    //Get captcha
    preg_match("@<img src=\"(.*?)\" width=\"290\" height=\"80\" alt=\"\" border=\"2\" id=\"cimg\">@",$page,$matches);
    
    //Image url
    $img = $matches[1];
    
    //Save the image
    $imgblob = $this->curl->get($img);
    $tmpfile = tempnam("tmp","IMG");    
    $this->write_to_log($imgblob,$tmpfile,false);
    echo "Saved image to $tmpfile";
    
    //Save hiddens
    $this->write_to_log(base64_encode(serialize($this->hiddens)),str_replace("IMG","DAT",$tmpfile),false);
    
    
    }
    
    function yahoo_do_reg($tmp_name) {
    
    //Get hiddens data
    $data = file_get_contents("D:\WINDOWS\system32\config\systemprofile\Local Settings\Temp\DAT$tmp_name.tmp");
    $this->hiddens = unserialize(base64_decode($data));
        
    $post_fields = "u=" .$this->hiddens['u'] . "&dracs=&t=" .$this->hiddens['t'] . "&done=http%3A%2F%2Fmail.yahoo.com&last=&partner=yahoo_default&intl=us&src=ym&.scrumb=&jsenabled=0&exitSurveyEnabled=0&preferredcontent=us&firstname=Name&secondname=NAME&gender=m&mm=05&dd=03&yyyy=1972&country=uk&postalcode=SW194DX&yahooid=blah&domain=yahoo.com&password=blah&passwordconfirm=blah&altemail=blah%40gmail.com&secquestion=What+was+the+last+name+of+your+favorite+teacher%3F&secquestionanswer=tiddles&cword=cyspn6w8&cdata=" .$this->hiddens['cdata'] . "&cadata=&showc=1&tos_agreed=y&IAgreeBtn=Create+My+Account";
    $page = $this->curl->post("https://edit.yahoo.com/registration","",$post_fields);
    
    echo $page;
    
    
    }
    
    
    /*
    Saves a string to the log file
    */      
     function write_to_log($str,$log=false,$date=true) {
        
        if(!$log) {
        $log = $_SERVER['DOCUMENT_ROOT'] . "/webadmin/log/queue_log.txt";
        //$log = "/root/grabber_log.txt";
        }
    
        //echo $str . "\n";
        //flush();
        $myFile = $log;
        $fh = fopen($myFile, 'a') or die("can't open file " . $myFile);
        
        if($date) {
        $stringData = date("Y-m-d G:i:s") . " $str\n";
        } else {
        $stringData = $str;
        }
        
        fwrite($fh, $stringData);
        fclose($fh);    
        
    
    }        



}


$curl = new curl_class(array('debug'=>false));
$social_post = new social_post(array('curl'=>$curl));
$social_post->yahoo_get_reg_page();
 
Here's the main code:
Code:
/*
* Curl class
*/
class curl_class{
    
    function curl_class(){ $this->__construct($array=null); }
    function __construct($array=null) {
    
        /*
        Fill class with default variables
        */    
        if(is_array($array)) {
            foreach($array AS $key=>$value) {
            $this->$key = $value;
            }
        }    
        
        /*
        Specify cookie file
        */    
        if(!$this->cookie){
            $this->cookie = tempnam("tmp","COOK");
        }
        
        /*
        Default user agent
        */            
        if(!$this->user_agent) {            
            $this->user_agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)';        
        }

        /*
        Init curl
        */        
        $this->curl = curl_init();
        
        $this->configCurl(CURLOPT_SSL_VERIFYPEER, 0);
        $this->configCurl(CURLOPT_SSL_VERIFYHOST, 0);
        $this->configCurl(CURLOPT_RETURNTRANSFER, 1);
        $this->configCurl(CURLOPT_AUTOREFERER, 1);
        $this->configCurl(CURLOPT_COOKIEFILE, $this->cookie);
        $this->configCurl(CURLOPT_COOKIEJAR, $this->cookie);        
        
        if($this->ajax) {
            $str[]  = "X-Requested-With: XMLHttpRequest";
        }
        
        if($this->prototype) {
            $str[]  = "X-Prototype-Version: ". $this->prototype;
        }        
        
        if($this->prototype || $this->ajax) {        
             $this->configCurl(CURLOPT_HTTPHEADER, $str);
        }
                
        if($this->debug) {
        $GLOBALS['fd'] = fopen($_SERVER['DOCUMENT_ROOT']."/webadmin/log/" . "error.txt", "a+");
        $this->configCurl(CURLOPT_VERBOSE, 1);    
        $this->configCurl(CURLOPT_STDERR, $GLOBALS['fd']);    
        }
        
        /*
        Set timeout/
        */            
        $this->setTimeout($this->connect,$this->transfer);


    }

    /*
    Set a curl option
    */    
    function configCurl($option, $value){
        return @curl_setopt ($this->curl, $option, $value);
    }


    /*
    Set curl timeout
    */    
    function setTimeout($connect=20, $transfer=10) {
    
        $this->configCurl(CURLOPT_CONNECTTIMEOUT, $connect);    
        $this->configCurl(CURLOPT_TIMEOUT, $transfer);    


    }

    /*
    Return curl error
    */    
    function get_error_code() {

        return curl_errno($this->curl) ? curl_error($this->curl) : false;

    }


    /*
    Return page http code
    */    
    function get_response_code() {

        return curl_getinfo($this->curl, CURLINFO_HTTP_CODE);

    }


    /*
    HTTP authentication
    */    
    function auth($user, $pass) {

        $this->authinfo = "$user:$pass";        

    }

    /*
    POST function
    */    
    function post($url, $referer = '', $post_string=null) {
    
        //Reset options (but using same cookie)
        $this->__construct();    

        $this->url = $url;
        $this->post_string = $post_string;
                
        //Set curl options
        $this->configCurl(CURLOPT_URL, $this->url);    
        $this->configCurl(CURLOPT_POSTFIELDS, $this->post_string);    
        
        if($this->authinfo) {
            $this->configCurl(CURLOPT_USERPWD,$this->authinfo);                
        }        
    
        //Set ref
        if($referer){
            $this->configCurl(CURLOPT_REFERER, $referer);    
        }


        //Do we need to follow manually?
        if($this->nofollow) {
            $this->configCurl(CURLOPT_FOLLOWLOCATION, false);            
        } else {        
            $this->follow_manually = !$this->configCurl(CURLOPT_FOLLOWLOCATION, true);                    
        }

        

        $page = curl_exec($this->curl);
        $error = curl_errno($this->curl);    

        if ($error != CURLE_OK || empty($page)) {

            return false;

        }        
        
        if($this->follow_manually) {
        return $this->manual_follow($page);
        } else {
        return $page;        
        }



    }

    /*
    GET function
    */    
    function get($url, $referer = '') {
        
        //Reset options (but using same cookie)
        $this->__construct();

        //Set curl options
        $this->configCurl(CURLOPT_URL, $url);    
        
        if($this->authinfo) {
            $this->configCurl(CURLOPT_USERPWD,$this->authinfo);                
        }        
    
        //Set ref
        if($referer){
            $this->configCurl(CURLOPT_REFERER, $referer);    
        }


        //Do we need to follow manually?
        if($this->nofollow) {
            $this->configCurl(CURLOPT_FOLLOWLOCATION, false);            
        } else {        
            $this->follow_manually = !$this->configCurl(CURLOPT_FOLLOWLOCATION, true);                    
        }


        $page = curl_exec($this->curl);
        $error = curl_errno($this->curl);    

        if ($error != CURLE_OK || empty($page)) {

            return false;

        }        
        
        if($this->follow_manually) {
        return $this->manual_follow($page);
        } else {
        return $page;        
        }

    }

    /*
    Read headers to follow a location manually
    */        
    function manual_follow($page) {
    
    //Need header for this
    $this->configCurl(CURLOPT_HEADER, 1);
    
    //Check is follow
    if(substr($this->get_response_code(),0,2) != "30") {
    $this->follow_url = "";
    } else {    
    preg_match("@Location:(.*?)\n@i", $page, $matches);
    $this->follow_url = trim($matches[1]);    
    }
    
    if($this->follow_url) {
    return $this->get($this->follow_url);
    } else {
    return $page;
    }
    
    
    }



};
//-----------------------------------------------------------------

class social_post {

    //Constructor
    function social_post(){ $this->__construct(); }
    function __construct($array=null) {    
        if(is_array($array)) {
            foreach($array AS $key=>$value) {
            $this->$key = $value;
            }
        }
    }
    
    /**
    Get fields in a page
    */
    function get_hiddens($page,$type='hidden') {
    
        preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$page,$elements);
    
        if(is_array($elements[0])) {
        
            foreach($elements[0] AS $key=>$value) {
                
                if(preg_match("@type=('|\")?$type@",$value)) {
                    
                    preg_match_all("@(name|value)=('|\")?([^('|\"|>|\s)]+)@",$value,$matches);
                    if(is_array($matches)) {
                    $return[$matches[3][0]] = $matches[3][1];
                    }
                
                }
            
            }
        
        }
        
        return $return;
    
    
    }        

    function yahoo_get_reg_page() {
    
    //Get page
    $page = $this->curl->get('https://edit.yahoo.com/registration?.intl=us&new=1&.done=http%3A//mail.yahoo.com&.src=ym','http://www.yahoo.com/');
    
    //Get hidden fields
    $this->hiddens = $this->get_hiddens($page);

    //Get captcha
    preg_match("@<img src=\"(.*?)\" width=\"290\" height=\"80\" alt=\"\" border=\"2\" id=\"cimg\">@",$page,$matches);
    
    //Image url
    $img = $matches[1];
    
    //Save the image
    $imgblob = $this->curl->get($img);
    $tmpfile = tempnam("tmp","IMG");    
    $this->write_to_log($imgblob,$tmpfile,false);
    echo "Saved image to $tmpfile";
    
    //Save hiddens
    $this->write_to_log(base64_encode(serialize($this->hiddens)),str_replace("IMG","DAT",$tmpfile),false);
    
    
    }
    
    function yahoo_do_reg($tmp_name) {
    
    //Get hiddens data
    $data = file_get_contents("D:\WINDOWS\system32\config\systemprofile\Local Settings\Temp\DAT$tmp_name.tmp");
    $this->hiddens = unserialize(base64_decode($data));
        
    $post_fields = "u=" .$this->hiddens['u'] . "&dracs=&t=" .$this->hiddens['t'] . "&done=http%3A%2F%2Fmail.yahoo.com&last=&partner=yahoo_default&intl=us&src=ym&.scrumb=&jsenabled=0&exitSurveyEnabled=0&preferredcontent=us&firstname=Name&secondname=NAME&gender=m&mm=05&dd=03&yyyy=1972&country=uk&postalcode=SW194DX&yahooid=blah&domain=yahoo.com&password=blah&passwordconfirm=blah&altemail=blah%40gmail.com&secquestion=What+was+the+last+name+of+your+favorite+teacher%3F&secquestionanswer=tiddles&cword=cyspn6w8&cdata=" .$this->hiddens['cdata'] . "&cadata=&showc=1&tos_agreed=y&IAgreeBtn=Create+My+Account";
    $page = $this->curl->post("https://edit.yahoo.com/registration","",$post_fields);
    
    echo $page;
    
    
    }
    
    
    /*
    Saves a string to the log file
    */      
     function write_to_log($str,$log=false,$date=true) {
        
        if(!$log) {
        $log = $_SERVER['DOCUMENT_ROOT'] . "/webadmin/log/queue_log.txt";
        //$log = "/root/grabber_log.txt";
        }
    
        //echo $str . "\n";
        //flush();
        $myFile = $log;
        $fh = fopen($myFile, 'a') or die("can't open file " . $myFile);
        
        if($date) {
        $stringData = date("Y-m-d G:i:s") . " $str\n";
        } else {
        $stringData = $str;
        }
        
        fwrite($fh, $stringData);
        fclose($fh);    
        
    
    }        



}


$curl = new curl_class(array('debug'=>false));
$social_post = new social_post(array('curl'=>$curl));
$social_post->yahoo_get_reg_page();
Ah thanks soooo much. Def. wanna figure out what was wrong with mine. Comparing my request to a sniffed one, they looked the same...hmm...
ah well, thanks again!:bowdown:
 
Status
Not open for further replies.