| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 59 | 2 | protected function curl_header($url) |
|
| 60 | { |
||
| 61 | 2 | $info = false; |
|
| 62 | if (($ch = curl_init()) !== false) |
||
| 63 | 2 | { |
|
| 64 | 2 | curl_setopt($ch, CURLOPT_URL, $url); |
|
| 65 | 2 | curl_setopt($ch, CURLOPT_HEADER, true); |
|
| 66 | 2 | curl_setopt($ch, CURLOPT_NOBODY, true); |
|
| 67 | 2 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
| 68 | curl_setopt($ch, CURLOPT_TIMEOUT, 10); |
||
| 69 | 2 | ||
| 70 | $info = curl_exec($ch); |
||
| 71 | 2 | ||
| 72 | curl_close($ch); |
||
| 73 | 2 | } |
|
| 74 | |||
| 75 | return $info; |
||
| 76 | } |
||
| 78 |