и написано:
"We've detected that your browser is not accepting cookies from Yahoo!.
In order to register and use a Yahoo! account, your browser must be able to accept cookies."
чего делать, даже не представляю. Есть какие соображения?
Код: Выделить всё
<?php
// The following code is required to properly run Xedant.com Human Emulator
require("../Templates/xedant_human_emulator.php");
echo "запустились".date( 'H:i l d F', time())."<br>";
$browser->navigate("http://www.fakenamegenerator.com/mobile/gen-male-us-us.php");
$browser->wait(1);
// получаем текст
//$fake_names= $webpage->get_source();
//$fake_names= $webpage->get_document_body("true");
$fake_names= $webpage->get_body();
$fake_names = strip_tags($fake_names, '<h1><a><br><h2><h3>');
//write4Log_string("fake_names.html", $fake_names);
$browser->wait(240,1);
preg_match('%<H1>Your Identity</H1>(.*)<BR>(.*)<BR>(.*)<BR><BR>%siU', $fake_names, $fake_matches);
print_r($fake_matches);
/*
[1] => Lawrence C. Messina [2] => 3728 Whitetail Lane [3] => Dallas, TX 75201 )
*/
//write4Log_string("fake_matches.html", implode( ' ', $fake_matches));
$gen_firstname = substr(trim($fake_matches[1]), 0, strpos(trim($fake_matches[1]), " "));
$gen_lastname = substr(trim($fake_matches[1]), strrpos(trim($fake_matches[1]), " ")+1, strlen(trim($fake_matches[1])));
$rand_1 = rand(0,1);
$rand_2 = rand(0,1);
$rand_3 = rand(0,1);
$gen_login = ($rand_1 ? strtolower($gen_firstname) : strrev($gen_lastname)) . ($rand_2 ? rand(1961, 1992) : "") . ($rand_1 ? strtolower($gen_lastname) : strrev($gen_firstname)) . (!$rand_2 ? rand(1953, 1992) : "").(!$rand_3 ? substr(strtolower($gen_firstname), 2) : "");
$gen_password = genPassword().rand(0,9);
$browser->clear_cash();
$browser->clear_history();
$browser->clear_address_bar_history();
$browser->clear_cookies("");
$browser->enable_quiet_regime("false");
$browser->enable_java_script("false");
$browser->clear_cookies("yahoo");
$browser->navigate('https://edit.yahoo.com/config/eval_register?.intl=us&new=1&.done=http%3A//geocities.yahoo.com/&.src=geo&.v=0&partner=&.partner=&pkg=&stepid=&.p=&promo=&.last=');
$browser->wait_for(240,1);
$input->set_value_by_name('.fn',$gen_firstname);
$input->set_value_by_name('.ln',$gen_lastname);
$listbox->select_name_by_inner_name('.sx','m');
$input->set_value_by_name('login',$gen_login);
$input->set_value_by_name('.pw',$gen_password);
$input->set_value_by_name('.pw2',$gen_password);
$listbox->select_name_by_inner_name('.pw_q','What is your fathers middle name?');
$input->set_value_by_name('.pw_a','iloveyahoo');
$listbox->select_name_by_inner_name('.bmon','7');
$input->set_value_by_name('.bday','1');
$input->set_value_by_name('.byear','198');
$input->set_value_by_name('.pc','07662');
//$captcha = $app->dlg_captcha_from_image_number(6);
$captcha = $app->dlg_captcha_from_url_exactly("ab.login.yahoo.com","false");
print_r($captcha);
$input->set_value_by_name('.secword',$captcha);
$browser->get_cookie();
//$mouse->click('269','506');
$browser->wait_for(240,1);
$button->click_by_number(0);
if (!$errorcode)
{
write4Log_string("acc.yahoo.com.txt", $gen_login.",".$gen_password.",".$gen_login."@yahoo.com\n", "a");
}
// Quit
$app->quit();
// ------------------------------------------------------func
function write4Log_string($filename, $record, $type = "w"){
$logFile = fopen($filename,$type);
fwrite($logFile,$record);
fclose($logFile);
}
function genPassword() {
$chars = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z", "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0");
$max_elements = count($chars) - 1;
$l = rand(8,13);
for ($i = 0; $i < $l; $i++) {
srand((double)microtime()*1000000);
$newpw .= $chars[rand(0,$max_elements)];
}
return $newpw;
}
?>