-
Notifications
You must be signed in to change notification settings - Fork 1
/
batch_index.php
85 lines (73 loc) · 2 KB
/
batch_index.php
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
set_time_limit(0);
require_once __DIR__ . '/bootstrap.php';
$urls = [
// // local test pages
// 'http://scanner.loc/local_pages/testwppage.html?bigWAdminID=',
// 'http://scanner.loc/local_pages/dlepage.html',
// 'http://scanner.loc/local_pages/bitrixpage.html',
//
// // other urls
// 'http://www.php.net/manual/ru/gearman.examples-reverse-task.php',
// 'http://google.com',
// 'http://yandex.ru',
// 'http://joomla.org',
// 'http://wordpress.org',
// 'https://github.com',
//
// 'http://citehr.com',
// 'http://bls.gov/home.htm',
// 'http://salary.com',
// 'http://payscale.com',
// 'http://socialsecurity.gov',
// 'http://hewitt.com',
// 'http://dol.gov',
// 'http://humanresources.about.com',
// 'http://dalecarnegie.com',
// 'http://doleta.gov',
// 'http://mercer.com',
// 'http://astd.org',
// 'http://brightscope.com',
// 'http://tmp.com',
// 'http://trinet.com',
'http://www.sitepoint.com',
];
// немного URL с сайта alexa.com из категории Business/HR
//$urls = [
// 'citehr.com',
// 'bls.gov/home.htm',
// 'salary.com',
// 'payscale.com',
// 'socialsecurity.gov',
// 'hewitt.com',
// 'dol.gov',
// 'humanresources.about.com',
// 'shrm.org',
// 'diversityinc.com',
// 'stevepavlina.com/blog/',
// 'osha.gov',
// 'hr.com',
// 'ere.net',
// 'cisin.com',
// 'blr.com',
// 'peopleadmin.com',
// 'wageworks.com',
// 'dalecarnegie.com',
// 'doleta.gov',
// 'mercer.com',
// 'astd.org',
// 'brightscope.com',
// 'tmp.com',
// 'trinet.com',
//];
// DETECT CYCLE!
$loader = new FileLoader();
$scanner = new Scanner($loader, __DIR__ . '/apps.json');
$category = new Category($loader, __DIR__ . '/apps.json');
require_once __DIR__ . '/lib/RollingCurl.php';
$rc = new RollingCurl();
foreach ($urls as $url) {
$rc->add(new RollingCurlRequest("http://scanner.loc/worker.php?url=" . urlencode($url)));
}
$rc->execute(10);
echo "All request sent";