| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | private function doGet($url) |
||
| 47 | { |
||
| 48 | $ch = curl_init(); |
||
| 49 | curl_setopt($ch, CURLOPT_URL, $url); |
||
| 50 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
||
| 51 | curl_setopt($ch, CURLOPT_HEADER, 0); |
||
| 52 | curl_setopt($ch, CURLOPT_TIMEOUT_MS, $this->outTime * 1000); |
||
| 53 | curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
||
| 54 | "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)", |
||
| 55 | ]); |
||
| 56 | $output = curl_exec($ch); |
||
| 57 | curl_close($ch); |
||
| 58 | |||
| 59 | return $output; |
||
| 60 | } |
||
| 61 | } |