@@ -72,7 +72,9 @@ discard block |
||
72 | 72 | curl_setopt($ch, CURLOPT_REFERER, $this->referer); |
73 | 73 | if($this->cookie === true) { |
74 | 74 | $cookie_dir = storage_path("cookies"); |
75 | - if(!file_exists($cookie_dir)) mkdir($cookie_dir); |
|
75 | + if(!file_exists($cookie_dir)) { |
|
76 | + mkdir($cookie_dir); |
|
77 | + } |
|
76 | 78 | $cookie_file = $cookie_dir."/".md5(request()->ip()).".txt"; |
77 | 79 | curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file); |
78 | 80 | curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file); |
@@ -84,7 +86,7 @@ discard block |
||
84 | 86 | |
85 | 87 | if($err) { |
86 | 88 | return $err; |
87 | - }else { |
|
89 | + } else { |
|
88 | 90 | return $response; |
89 | 91 | } |
90 | 92 | } |