-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_soap.php
45 lines (34 loc) · 1.02 KB
/
get_soap.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
<?php
define('_SAFE_ACCESS_', true);
require_once('conf.php');
require_once(_INCLUDES_DIR_ . 'common.php');
$db = new DataBase();
/**
* Return array of proxies
*
* @param integer $number
* @param string $anonymous
* @param string $quality
* @return array
*/
function getProxies($number, $anonymous, $quality) {
global $db;
$_REQUEST['n'] = $number;
$_REQUEST['a'] = $anonymous;
$_REQUEST['q'] = $quality;
$getter = new Getter();
$proxies = array_slice($getter->giveMeProxies(), 0, intval(@$_REQUEST['n']));
Reporter::messOfficial('Got ' . count($proxies) . ' proxies');
$string_proxies = array();
foreach($proxies as $proxy)
$string_proxies[] = "$proxy[px_ip]:$proxy[px_port]";
return $string_proxies;
}
$server = new SoapServer('getproxies.wsdl');
$server->addFunction('getProxies');
$server->handle();
Caller::startBackground(
Settings::getSetting('_START_CHECKER_ON_GET_'),
Settings::getSetting('_START_GOOD_CHECKER_ON_GET_'),
Settings::getSetting('_START_LINKER_ON_GET_'));
?>