php The following code is required to properly run Xedant com Human Em

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
// The following code is required to properly run Xedant.com Human Emulator
require("../Templates/xedant_human_emulator.php");
$number = "964195919591";
$times = "10";
// парсим цитату
$browser->navigate("http://bash.org.ru/forweb/?u");
$browser->wait(1,100);
$phones = $webpage->get_document_body("false");
$phones = preg_replace("#var(.*)span#","",$phones);
$phones = str_replace("' + ","",$phones);
$phones = str_replace("<br>","\r\n",$phones);
$phones = str_replace("<'br>","\r\n",$phones);
$phones = str_replace("<'br />","\r\n",$phones);
$phones = str_replace("document.write(borq);","",$phones);
$phones = str_replace('a href="http://bash.org.ru/">Больше на bash.org.ru!',"\r\n",$phones);
$phones = preg_replace("#<'s(.*)'#","",$phones);
$phones = str_replace("<'/small><'/a><'/div>'; ","",$phones);
$bash = $phones;
$browser->navigate('http://www.beonline.ru/portal/comm/send_sms');
$browser->wait_for(240,1);
$image->save_to_file_by_number(54,"C:\\WebServers\\1.gif");
sleep(3);
$ac = $image->recognize_by_anticaptcha("", "C:\\WebServers\\1.gif","3872d20d59a70d8d217985170e7f4e3c");
$checkbox->click_by_name('translit');
$input->set_value_by_name('confirm_code',$ac);
$input->set_value_by_name('phone',$number);
$textarea->set_value_by_name('message',$bash);
$image->click_by_number('63');
$browser->wait_for(240,1);
$phones = $webpage->get_document_body("false");
$pos = strpos($phones, "Ваша заявка на отправку SMS-сообщения принята");
if ($pos === false) {
echo "Ошибка отправки =\ еще раз <br>'";
$n = $n-1;
} else {
echo "$n-я смска ушла<br> ";
sleep(30);
}
$n++;
}
echo "Все отправили в ".date( 'H:i', time())."<br>";
$browser->navigate("http://iseemore.net/sms/del.php");
$browser->wait(1);
}
// Quit
$app->quit();
?>