Conditions | 4 |
Paths | 6 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | protected function remotePointer(IConnectionParams $params) |
||
24 | { |
||
25 | // Make the request to the server |
||
26 | // If possible, securely post using HTTPS, your PHP server will need to be SSL enabled |
||
27 | $timeout = is_null($params->getTimeout()) ? 10.0 : floatval($params->getTimeout()); // do NOT ask - php7 + phpstan |
||
28 | if (!$filePointer = fsockopen($params->getSchema() . $params->getHost(), intval($params->getPort()), $errno, $errStr, $timeout)) { |
||
29 | throw new RequestException($this->getRRLang()->rrSocketCannotConnect()); |
||
30 | } |
||
31 | if (!is_null($params->getTimeout())) { |
||
32 | stream_set_timeout($filePointer, intval($params->getTimeout())); |
||
33 | } |
||
34 | return $filePointer; |
||
35 | } |
||
37 |