-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOZceny.php
More file actions
39 lines (25 loc) · 784 Bytes
/
OZceny.php
File metadata and controls
39 lines (25 loc) · 784 Bytes
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
<?php
$xhe_host ="127.0.0.1:7030";
// The following code is required to properly run XWeb Human Emulator
require("C:\XWeb\Human Emulator Free\Templates\xweb_human_emulator.php");
// navigate to google
$keys = file("C:\\1.txt");
$file = "C:\\3.html";
for($ii=0;$ii<count($keys);$ii++)
{
// ïîëó÷èòü çàïðîñ
$ks = trim($keys[$ii]);
// ïåðåéòè
$browser->navigate("https://oz.by/search/?q=".$ks);
// çàäàäèì çàïðîñ
$input->set_value_by_name("q",$ks);
$btn->click_by_number(0);
$spn = $span->get_by_attribute("class","b-product-control__text b-prod", false)->get_inner_text();
$r="<p>".$ks."/".$h1->get_inner_text_by_number(0)."/OZ.by/".$spn."</p>";
$textfile->add_string_to_file($file,$r)."<br>";
}
// ïîêàçàòü
$app->shell_execute("",$file);
// Quit
$app->quit();
?>